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
Charles-Edouard Brétéché a1d06b41df
feat: add create exception cli command (#7781)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-12 12:58:30 +00:00

81 lines
1.2 KiB
YAML

apiVersion: kyverno.io/v2alpha1
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 }}