Skip to content

Commit

Permalink
skipper: add config to enable ingress validation webhook
Browse files Browse the repository at this point in the history
Followup on #6341

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov committed Aug 24, 2023
1 parent 1b0d57e commit 30e886d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cluster/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,13 @@ skipper_serve_method_metric: "false"
# of the skipper_serve_host_duration_seconds_bucket metric.
skipper_serve_status_code_metric: "false"

# disabled|provisioned|enabled routegroup validation ( skipper webhook )
# disabled|provisioned|enabled routegroup validation via skipper webhook
# can be one of disabled|provisioned|enabled
routegroups_validation: "enabled"

# disabled|enabled ingress validation via skipper webhook
ingresses_validation: "disabled"

# tokeninfo
{{if eq .Cluster.Environment "production"}}
# production|bridge|disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
application: skipper-ingress
component: webhook
webhooks:
{{ if eq .Cluster.ConfigItems.routegroups_validation "enabled" }}
# {{ if eq .Cluster.ConfigItems.routegroups_validation "enabled" }}
- name: "routegroup-admitter.teapot.zalan.do"
rules:
- operations: ["CREATE", "UPDATE"]
Expand All @@ -19,7 +19,8 @@ webhooks:
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
{{ end }}
# {{ end }}
# {{ if eq .Cluster.ConfigItems.ingresses_validation "enabled" }}
- name: "ingress-admitter.teapot.zalan.do"
rules:
- operations: ["CREATE", "UPDATE"]
Expand All @@ -31,4 +32,5 @@ webhooks:
caBundle: "{{ .ConfigItems.ca_cert_decompressed }}"
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
timeoutSeconds: 5
# {{ end }}

0 comments on commit 30e886d

Please sign in to comment.