1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 01:46:55 +00:00
kyverno/cmd/cli/kubectl-kyverno/commands/create/templates/exception.yaml
Mariam Fahmy c7e2cb13d9
fix: use v2beta1 version of exceptions in kyverno create CLI (#8908)
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2023-11-15 07:04:45 -05:00

81 lines
1.2 KiB
YAML

apiVersion: kyverno.io/v2beta1
kind: PolicyException
metadata:
name: {{ .Name }}
namespace: {{ .Namespace }}
spec:
background: {{ .Background }}
match:
{{- with .Match.Any }}
any:
{{- range . }}
-
{{- with .Kinds }}
kinds:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Names }}
names:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Namespaces }}
namespaces:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Operations }}
operations:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Match.All }}
all:
{{- range . }}
-
{{- with .Kinds }}
kinds:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Names }}
names:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Namespaces }}
namespaces:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- with .Operations }}
operations:
{{- range . }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Exceptions }}
exceptions:
{{- range . }}
- policyName: {{ .PolicyName }}
ruleNames:
{{- range .RuleNames }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}