UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

Update require-run-as-non-root to honor exclusions

Merged Rob Ferguson requested to merge non-root-exclusion into main
All threads resolved!
5 files
+ 11
10
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -170,14 +170,15 @@ data:
{{- define "kyverno-policies.precondition.default" -}}
preconditions:
all:
{{- include "kyverno-policies.precondition.create-update" . | nindent 2 }}
{{- include "kyverno-policies.precondition.create-update-background" . | nindent 2 }}
{{- end -}}
{{/* Add a precondition that triggers on create or update events only */}}
{{- define "kyverno-policies.precondition.create-update" -}}
{{- define "kyverno-policies.precondition.create-update-background" -}}
- key: "{{ "{{" }}request.operation || 'BACKGROUND'{{ "}}" }}"
operator: In
value:
- CREATE
- UPDATE
- BACKGROUND
{{- end -}}
\ No newline at end of file
Loading