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
Policyreport cli #1235
Policyreport cli #1235
Conversation
…erno into feature/reports-cli
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.
Adding other comments:
-
Here
kyverno/pkg/kyverno/apply/command.go
Lines 163 to 171 in 7fbe422
if common.PolicyHasVariables(*policy) && variablesString == "" && valuesFile == "" { rc.skip += len(resources) fmt.Printf("\nskipping policy %s as it has variables. pass the values for the variables using set/values_file flag", policy.Name) continue } if common.PolicyHasVariables(*policy) && variablesString == "" && valuesFile == "" { return sanitizedError.NewWithError(fmt.Sprintf("policy %s have variables. pass the values for the variables using set/values_file flag", policy.Name), err) } -
Do we still mutate policy before applying it? I'm applying disallow_latest_tag to a deployment, but I don't see the policy report
kyverno apply samples/best_practices/disallow_latest_tag.yaml --policy-report --cluster -r nginx-2
I1110 18:17:32.585376 25815 client.go:258] dclient/Poll "msg"="starting registered resources sync" "period"=300000000000
----------------------------------------------------------------------
POLICY REPORT: not generated as no validation failure
@NoSkillGirl Is this doc update to date? The first three worked for me while case 4 and 5 gave me the following error:
|
Related issue
closes #1065
What type of PR is this?
Proposed changes
This PR supports policy report when the policies manifest is applied on resources passed as file/folder or available in cluster.
Checklist
works.