Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 12, 2022
1 parent dcc1d2f commit 34f1c5f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion config/clusters/2i2c/support.values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
prometheusAuth:
enabled: true


prometheus:
server:
ingress:
Expand Down
9 changes: 5 additions & 4 deletions deployer/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ def deploy_support(self):
support_dir = (Path(__file__).parent.parent).joinpath("helm-charts", "support")
# subprocess.check_call(["helm", "dep", "up", support_dir])

# contains both encrypted and unencrypted values files
values_file_paths = [
support_dir.joinpath("enc-support.secret.yaml")
] + [self.config_path.joinpath(p) for p in self.support['helm_chart_values_files']]
# contains both encrypted and unencrypted values files
values_file_paths = [support_dir.joinpath("enc-support.secret.yaml")] + [
self.config_path.joinpath(p)
for p in self.support["helm_chart_values_files"]
]

with get_decrypted_files(values_file_paths) as values_files:
cmd = [
Expand Down
4 changes: 1 addition & 3 deletions deployer/file_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,4 @@ def get_decrypted_files(files):
files should be all absolute paths
"""
with ExitStack() as stack:
yield [
stack.enter_context(get_decrypted_file(f)) for f in files
]
yield [stack.enter_context(get_decrypted_file(f)) for f in files]
3 changes: 2 additions & 1 deletion deployer/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def deploy(self, auth_provider, secret_key, skip_hub_health_test=False):
with tempfile.NamedTemporaryFile(
mode="w"
) as generated_values_file, get_decrypted_files(
self.cluster.config_path.joinpath(p) for p in self.spec["helm_chart_values_files"]
self.cluster.config_path.joinpath(p)
for p in self.spec["helm_chart_values_files"]
) as values_files:
json.dump(generated_values, generated_values_file)
generated_values_file.flush()
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/support/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ properties:
type: object
additionalProperties: false
required:
- enabled
- enabled
properties:
enabled:
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/support/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ prometheus:
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: prometheus-ingress-auth
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required'
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
strategy:
Expand Down

0 comments on commit 34f1c5f

Please sign in to comment.