Skip to content

Commit 5217438

Browse files
author
Martin Linkhorst
committed
allow to turn on/off the rolebinding admitter via configitem
1 parent 6a70dfe commit 5217438

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cluster/config-defaults.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,9 @@ teapot_admission_controller_configmap_deletion_protection_enabled: "true"
674674
teapot_admission_controller_configmap_deletion_protection_factories_enabled: "true"
675675
{{end}}
676676

677+
# enable the rolebinding admission-controller webhook which validates rolebindings and clusterrolebindings
678+
teapot_admission_controller_enable_rolebinding_webhook: "true"
679+
677680
# Enable and configure Pod Security Policy rules implemented in admission-controller.
678681
teapot_admission_controller_pod_security_policy_enabled: "true"
679682

cluster/manifests/01-admission-control/teapot.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ webhooks:
252252
apiGroups: [""]
253253
apiVersions: ["v1"]
254254
resources: ["services"]
255+
{{- if eq .Cluster.ConfigItems.teapot_admission_controller_enable_rolebinding_webhook "true" }}
255256
- name: rolebinding-admitter.teapot.zalan.do
256257
clientConfig:
257258
url: "https://localhost:8085/rolebinding"
@@ -265,3 +266,4 @@ webhooks:
265266
apiGroups: ["rbac.authorization.k8s.io"]
266267
apiVersions: ["v1"]
267268
resources: ["rolebindings", "clusterrolebindings"]
269+
{{- end }}

0 commit comments

Comments
 (0)