-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't workingvalidationIssues pertaining to the validate ability.Issues pertaining to the validate ability.
Milestone
Description
Kyverno Version
1.10.0
Kubernetes Version
1.25.x
Kubernetes Platform
K3d
Kyverno Rule Type
Validate
Description
Something has happened to the message printed as the result of a validate rule in Enforce
mode failing on a resource. This is what it used to be for 1.9:
error: failed to create deployment: admission webhook "validate.kyverno.svc-fail" denied the request:
resource Deployment/default/nginx was blocked due to the following policies
require-labels:
autogen-check-for-labels: 'validation error: label ''team'' is
required. Rule autogen-check-for-labels failed at path /spec/template/metadata/labels/app.kubernetes.io/name/'
This is what it is currently in 1.10:
Error from server: admission webhook "validate.kyverno.svc-fail" denied the request:
resource Pod/default/nginx for resource violation:
require-labels:
check-team: 'validation error: label ''team'' is required. rule check-team failed
at path /metadata/labels/team/'
Notice the difference in the middle line.
Steps to reproduce
- Use any basic validate rule in
Enforce
mode to see the message thrown.
Expected behavior
Error from server: admission webhook "validate.kyverno.svc-fail" denied the request:
policy Pod/default/nginx was blocked due to the following policies:
require-labels:
check-team: 'validation error: label ''team'' is required. rule check-team failed
at path /metadata/labels/team/'
Screenshots
No response
Kyverno logs
No response
Slack discussion
No response
Troubleshooting
- I have read and followed the documentation AND the troubleshooting guide.
- I have searched other issues in this repository and mine is not recorded.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingvalidationIssues pertaining to the validate ability.Issues pertaining to the validate ability.