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:
parent
be4705faa3
commit
9070334df0
16 changed files with 17 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue