1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix(policy chart): fix the merging of policyExclude customizations to avoid wrong overrides (#11653)

Signed-off-by: Caio Begotti <caiobegotti@gmail.com>
This commit is contained in:
Caio Begotti 2024-11-25 08:48:18 -03:00 committed by GitHub
parent be4705faa3
commit 9070334df0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 17 additions and 15 deletions

View file

@ -26,3 +26,5 @@ annotations:
description: Remove spec.validationFailureAction field from policies as it is deprecated
- kind: added
description: Add spec.validate[*].failureAction field to policies
- kind: fixed
description: Fix the merging of policyExclude customizations to avoid wrong overrides

View file

@ -31,7 +31,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "adding-capabilities") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -32,7 +32,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "host-namespaces") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -31,7 +31,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "host-path") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -31,7 +31,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "host-ports-none") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -32,7 +32,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "host-process-containers") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -30,7 +30,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "privileged-containers") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -32,7 +32,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "check-proc-mount") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -33,7 +33,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "app-armor") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -31,7 +31,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "check-seccomp") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -34,7 +34,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "check-sysctls") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -30,7 +30,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "privilege-escalation") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -30,7 +30,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "run-as-non-root-user") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -31,7 +31,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "run-as-non-root") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -33,7 +33,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "check-seccomp-strict") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -33,7 +33,7 @@ spec:
- resources:
kinds:
- Pod
{{- with index .Values "policyExclude" $name }}
{{- with merge (index .Values "policyExclude" "restricted-volumes") (index .Values "policyExclude" $name) }}
exclude:
{{- toYaml . | nindent 8 }}
{{- end }}