-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
Kyverno CLI Version
1.11.0
Description
The output from kyverno create exception
results in a formatting error where a dash is on a single line. Notice how a dash appears between lines all
and kinds
.
$ kyverno create exception my-exception --namespace my-ns --policy-rules "policy,rule-1,rule-2" --all "kind=Pod,kind=Deployment,name=test-*"
apiVersion: kyverno.io/v2alpha1
kind: PolicyException
metadata:
name: my-exception
namespace: my-ns
spec:
background: true
match:
all:
-
kinds:
- Pod
- Deployment
names:
- test-*
exceptions:
- policyName: policy
ruleNames:
- rule-1
- rule-2
Steps to reproduce
- kyverno create exception my-exception --namespace my-ns --policy-rules "policy,rule-1,rule-2" --all "kind=Pod,kind=Deployment,name=test-*"
Expected behavior
apiVersion: kyverno.io/v2alpha1
kind: PolicyException
metadata:
name: my-exception
namespace: my-ns
spec:
background: true
match:
all:
- kinds:
- Pod
- Deployment
names:
- test-*
exceptions:
- policyName: policy
ruleNames:
- rule-1
- rule-2
Screenshots
No response
Kyverno logs
No response
Slack discussion
No response
Troubleshooting
- I have read and followed the troubleshooting guide.
- I have searched other issues in this repository and mine is not recorded.