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
The results of some of the rules in a policy are missing in their corresponding test.yaml. #2169
Comments
disallow_cri_sock_mount.yaml
](https://github.com/kyverno/policies/blob/main/best-practices/disallow_cri_sock_mount/disallow_cri_sock_mount.yaml) but if you look at [test.yaml
](https://github.com/kyverno/policies/blob/main/best-practices/disallow_cri_sock_mount/test.yaml) file, contains the results for 2 rules only.
Should you be assigned this instead, @viveksahu26 ? |
Let it be with @NoSkillGirl . |
@viveksahu26 - The test case is working as expected. I think you are little confused between the use case of Considering the above case: For more information check the documentation - https://kyverno.io/docs/kyverno-cli/ @chipzoller - please check it once, how clear is the above case is to the user while you are reviewing the documentation. |
Honestly, the CLI documentation needs a major rework as there isn't enough information in either of these commands to give a complete enough explanation on what they do and how to use them. |
@chipzoller - Please try to mention the points as much you can. If you need any help about the functionality description, do let me know. |
update documentation for this issue - kyverno/website#212 |
Description of the problem
The results of some of the rules in a policy are missing in their corresponding test.yaml. For example, In this policy, 3 rules are present in
disallow_cri_sock_mount.yaml
but if you look attest.yaml
file, contains the results for 2 rules only.To reproduce:-
Get the policy, resource and test.yaml file from here(https://github.com/kyverno/policies/tree/main/best-practices/disallow_cri_sock_mount).
Run the command
kubectl kyverno apply disallow_cri_sock_mount.yaml -r resource.yaml --policy-report
.Policy-report summary:
error: 0
fail: 1
pass: 2
skip: 0
warn: 0
As we can see that, out of 3 rules, 2 rules are pass and one rule fails. But, in
test.yaml
, results for 2 rules are mention but results for one rule is missing.Solution:-
So, finally, the conclusion is results of each rule mention in the policy should be present in the
test.yaml
file.Originally posted by @viveksahu26 in #2039
The text was updated successfully, but these errors were encountered: