Skip to content
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

Document how to test policies and validate policy execution results #212

Closed
JimBugwadia opened this issue May 15, 2020 · 6 comments
Closed
Assignees

Comments

@JimBugwadia
Copy link
Member

Its not clear how policy execution can be verified, and what the intent of status and events in a policy resource should do.

Reported on the Kyverno slack channel:

I have had some hard time debugging issues from my policies, it seems the policies have a status section and an event section but did not find many information about their meaning on the documentations. Apparently other resources may have policies related event (see pod above). This is not all clear to me where to look for information when testing policies.

We also need to improve documentation on the CLI and how it can be used for testing policies.

@JimBugwadia
Copy link
Member Author

@NoSkillGirl - can you please review the CLI documentation and suggest how we can improve?

@chipzoller
Copy link
Member

Sounds like this may be better as a website repo issue? @NoSkillGirl I'll be glad to collaborate with you in getting more of this worked into the docs.

@chipzoller
Copy link
Member

chipzoller commented Jul 15, 2021

@NoSkillGirl Can you please help me identify gaps here with respect to this issue? I can transfer it to kyverno/website and self assign it, but I'd like some assistance from you.

@NoSkillGirl
Copy link
Contributor

Sure @chipzoller
These are the gaps according to me.

  • For apply command, we didn't mention what would be the response of the command and how to interpret it
  • User can give a log level when applying any CLI command. documentation for choosing different log levels is missing
  • Different type of policies produces different type of results, but it's not there in documentation
    • validate policy will give only pass or fail
    • mutate policy will print the mutated policy
    • generate policy will gives only pass or fail, but the generated resource (what we get in case of the policy applied in webhook) won't get printed.

@chipzoller
Copy link
Member

Thanks, @NoSkillGirl. Transferring to kyverno/website and will pick it up there.

@chipzoller
Copy link
Member

Looks like all of these either have been addressed or are self-documented by the CLI. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants