New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate policy in cli according to policy schema #1817
Validate policy in cli according to policy schema #1817
Conversation
@NoSkillGirl - can you add "proof manifests" to this PR? |
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
1341272
to
fe05f03
Compare
Added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NoSkillGirl - the changes look good, can you also add unit tests to cover this change?
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Forgot to mention this last time, can you address this?
pkg/kyverno/validate/command.go#L199
[golangci] reported by reviewdog 🐶
S1002: should omit comparison to bool constant, can be simplified to `invalidPolicyFound` (gosimple)
Raw Output:
pkg/kyverno/validate/command.go:199:5: S1002: should omit comparison to bool constant, can be simplified to `invalidPolicyFound` (gosimple)
if invalidPolicyFound == true {
will add the change |
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
Related issue
closes #1700
What type of PR is this
Proposed Changes
Proof Manifests
Use the below policy (addRequest.yaml):
Validate the above policy in kyverno CLI using:
kyverno validate addRequest.yaml
As the rule name is greater than 63 characters, kyverno validation fails with the following error:
Checklist