Skip to content

Commit

Permalink
python syntax fix + remove port override in mutatewebhook
Browse files Browse the repository at this point in the history
  • Loading branch information
masaruhoshi committed Feb 4, 2022
1 parent a5a3bc4 commit 849472c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions connaisseur/flask_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ def handle_alert_config_error(err):


@APP.route("/mutate", methods=["POST"])
@metrics.counter('mutate_requests_total', 'Total number of mutate requests',labels={'allowed': lambda r: r.get_json(silent=True)['response']['allowed'],
'status_code': lambda r: r.get_json(silent=True)['response']['status']['code']})
@metrics.counter(
"mutate_requests_total",
"Total number of mutate requests",
labels={
"allowed": lambda r: r.get_json(silent=True)["response"]["allowed"],
"status_code": lambda r: r.get_json(silent=True)["response"]["status"]["code"],
},
)
def mutate():
"""
Handle the '/mutate' path and accept CREATE and UPDATE requests.
Expand Down
1 change: 0 additions & 1 deletion helm/templates/certificate_webhook-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ webhooks:
name: {{ .Chart.Name }}-svc
namespace: {{ .Release.Namespace }}
path: /mutate
port: {{ .Values.service.port }}
caBundle: {{ default ($certs.Cert | b64enc) (include "getInstalledTLSCert" .) }}
rules:
- operations: ["CREATE", "UPDATE"]
Expand Down

0 comments on commit 849472c

Please sign in to comment.