File tree Expand file tree Collapse file tree 5 files changed +50
-1
lines changed
node-pools/master-default Expand file tree Collapse file tree 5 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -677,6 +677,11 @@ teapot_admission_controller_configmap_deletion_protection_factories_enabled: "tr
677
677
# enable the rolebinding admission-controller webhook which validates rolebindings and clusterrolebindings
678
678
teapot_admission_controller_enable_rolebinding_webhook : " true"
679
679
680
+ # enable the generic admission-controller webhook which catches all resources
681
+ teapot_admission_controller_enable_generic_webhook : " false"
682
+ # prevent write operations for non-admin users in protected namespaces
683
+ teapot_admission_controller_prevent_write_operations : " false"
684
+
680
685
# Enable and configure Pod Security Policy rules implemented in admission-controller.
681
686
teapot_admission_controller_pod_security_policy_enabled : " true"
682
687
Original file line number Diff line number Diff line change 12
12
13
13
dns.default.subdomain-max-length : " {{ .Cluster.ConfigItems.subdomain_max_length }}"
14
14
15
+ generic.prevent-write-operations.enable : " {{ .Cluster.ConfigItems.teapot_admission_controller_prevent_write_operations }}"
16
+
15
17
pod.container-resource-control.min-memory-request : " 25Mi"
16
18
pod.container-resource-control.default-cpu-request : " {{ .Cluster.ConfigItems.teapot_admission_controller_default_cpu_request }}"
17
19
pod.container-resource-control.default-memory-request : " {{ .Cluster.ConfigItems.teapot_admission_controller_default_memory_request }}"
Original file line number Diff line number Diff line change @@ -267,3 +267,41 @@ webhooks:
267
267
apiVersions : ["v1"]
268
268
resources : ["rolebindings", "clusterrolebindings"]
269
269
{{- end }}
270
+ {{- if eq .Cluster.ConfigItems.teapot_admission_controller_enable_generic_webhook "true" }}
271
+ - name : generic-namespaced-admitter.teapot.zalan.do
272
+ clientConfig :
273
+ url : " https://localhost:8085/generic"
274
+ caBundle : " {{ .Cluster.ConfigItems.ca_cert_decompressed }}"
275
+ admissionReviewVersions : ["v1beta1"]
276
+ failurePolicy : Fail
277
+ sideEffects : " NoneOnDryRun"
278
+ matchPolicy : Equivalent
279
+ namespaceSelector :
280
+ matchExpressions :
281
+ - key : kubernetes.io/metadata.name
282
+ operator : In
283
+ values : [ "kube-system", "visibility", "kubenurse" ]
284
+ rules :
285
+ - operations : [ "*" ]
286
+ apiGroups : ["*"]
287
+ apiVersions : ["*"]
288
+ resources : ["*/*"]
289
+ scope : " Namespaced"
290
+ - name : generic-cluster-admitter.teapot.zalan.do
291
+ clientConfig :
292
+ url : " https://localhost:8085/generic"
293
+ caBundle : " {{ .Cluster.ConfigItems.ca_cert_decompressed }}"
294
+ admissionReviewVersions : ["v1beta1"]
295
+ failurePolicy : Fail
296
+ sideEffects : " NoneOnDryRun"
297
+ matchPolicy : Equivalent
298
+ objectSelector :
299
+ matchLabels :
300
+ admission.zalando.org/infrastructure-component : " true"
301
+ rules :
302
+ - operations : [ "*" ]
303
+ apiGroups : ["*"]
304
+ apiVersions : ["*"]
305
+ resources : ["*/*"]
306
+ scope : " Cluster"
307
+ {{- end }}
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ apiVersion: rbac.authorization.k8s.io/v1
8
8
kind : ClusterRole
9
9
metadata :
10
10
name : prometheus
11
+ labels :
12
+ admission.zalando.org/infrastructure-component : " true"
11
13
rules :
12
14
- apiGroups : [""]
13
15
resources :
@@ -37,6 +39,8 @@ apiVersion: rbac.authorization.k8s.io/v1
37
39
kind : ClusterRoleBinding
38
40
metadata :
39
41
name : prometheus
42
+ labels :
43
+ admission.zalando.org/infrastructure-component : " true"
40
44
roleRef :
41
45
apiGroup : rbac.authorization.k8s.io
42
46
kind : ClusterRole
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ write_files:
206
206
limits :
207
207
memory : {{ .Values.InstanceInfo.MemoryFraction (parseInt64 .Cluster.ConfigItems.apiserver_memory_limit_percent)}}
208
208
{{- end }}
209
- - image : 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/admission-controller:master-222
209
+ - image : 926694233939.dkr.ecr.eu-central-1.amazonaws.com/production_namespace/teapot/admission-controller:master-224
210
210
name : admission-controller
211
211
lifecycle :
212
212
preStop :
You can’t perform that action at this time.
0 commit comments