File tree Expand file tree Collapse file tree
charts/kubewarden-controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 - --leader-elect
5252 - --deployments-namespace={{ .Release.Namespace }}
5353 - --webhook-service-name={{ include "kubewarden-controller.fullname" . }}-webhook-service
54+ {{- if .Values.alwaysAcceptAdmissionReviewsOnDeploymentsNamespace }}
5455 - --always-accept-admission-reviews-on-deployments-namespace
56+ {{- end }}
5557 - --zap-log-level={{ .Values.logLevel }}
5658 {{- if .Values.mTLS.enable }}
5759 - --client-ca-configmap-name={{ .Values.mTLS.configMapName }}
Original file line number Diff line number Diff line change 1+ suite : alwaysAcceptAdmissionReviewsOnDeploymentsNamespace flag
2+ templates :
3+ - deployment.yaml
4+ tests :
5+ - it : " should include the flag when alwaysAcceptAdmissionReviewsOnDeploymentsNamespace is true (default)"
6+ asserts :
7+ - contains :
8+ path : spec.template.spec.containers[0].args
9+ content : " --always-accept-admission-reviews-on-deployments-namespace"
10+
11+ - it : " should include the flag when alwaysAcceptAdmissionReviewsOnDeploymentsNamespace is explicitly true"
12+ set :
13+ alwaysAcceptAdmissionReviewsOnDeploymentsNamespace : true
14+ asserts :
15+ - contains :
16+ path : spec.template.spec.containers[0].args
17+ content : " --always-accept-admission-reviews-on-deployments-namespace"
18+
19+ - it : " should not include the flag when alwaysAcceptAdmissionReviewsOnDeploymentsNamespace is false"
20+ set :
21+ alwaysAcceptAdmissionReviewsOnDeploymentsNamespace : false
22+ asserts :
23+ - notContains :
24+ path : spec.template.spec.containers[0].args
25+ content : " --always-accept-admission-reviews-on-deployments-namespace"
Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ preDeleteHook:
145145 runAsNonRoot : true
146146 seccompProfile :
147147 type : RuntimeDefault
148+ # If true, the controller will always accept admission reviews in the
149+ # deployment namespace. It is recommended to keep this value true unless you
150+ # have a specific reason to disable it. This is a safety flag to avoid policy
151+ # evaluations that could interfere with the Kubewarden stack running in the
152+ # admission controller namespace.
153+ alwaysAcceptAdmissionReviewsOnDeploymentsNamespace : true
148154# Verbosity of logging. Can be one of 'debug', 'info', 'error'.
149155logLevel : info
150156# open-telemetry options
You can’t perform that action at this time.
0 commit comments