mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-15 12:17:56 +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:
parent
9906505ee5
commit
a08cb71deb
2 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue