1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-15 20:20:22 +00:00

fix: use the default namespace in case --namespace isn't set in kyverno create exception (#9022)

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
This commit is contained in:
Mariam Fahmy 2023-11-27 12:04:20 +02:00 committed by GitHub
parent 9906505ee5
commit a08cb71deb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ apiVersion: kyverno.io/v2beta1
kind: PolicyException kind: PolicyException
metadata: metadata:
name: test name: test
namespace: namespace: default
spec: spec:
background: true background: true
match: match:
@ -76,7 +76,7 @@ apiVersion: kyverno.io/v2beta1
kind: PolicyException kind: PolicyException
metadata: metadata:
name: test name: test
namespace: namespace: default
spec: spec:
background: true background: true
match: match:

View file

@ -2,7 +2,7 @@ apiVersion: kyverno.io/v2beta1
kind: PolicyException kind: PolicyException
metadata: metadata:
name: {{ .Name }} name: {{ .Name }}
namespace: {{ .Namespace }} namespace: {{ or .Namespace "default" }}
spec: spec:
background: {{ .Background }} background: {{ .Background }}
match: match: