1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-10 09:56:55 +00:00
kyverno/cmd/cli/kubectl-kyverno/commands/create/templates/exception.yaml

80 lines
1.2 KiB
YAML
Raw Normal View History

apiVersion: kyverno.io/v2
kind: PolicyException
metadata:
name: {{ .Name }}
namespace: {{ or .Namespace "default" }}
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 }}