-
Notifications
You must be signed in to change notification settings - Fork 777
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
Not able to see violations in constraints. #1783
Comments
Just to be sure: audit only reports violations by resources that already exist on the cluster, it doesn't report requests that are denied by the admission webhook. You were expecting to find pre-existing violations, correct? The log error is likely a red herring -- that's a transient error due to more than one pod attempting to create a constraint template CRD and shouldn't affect audit. Can you post the contents of a constraint where you expect to see violations but aren't seeing any, particularly the status section? Posting the associated constraint template an a pre-existing resource that should be raising a violation would also be helpful. Also, looking through any log entries on the audit pod that have the term |
the pods are restarting againg and again and i have given loglevel as error so now not able to see any auditlogs.
|
Ah, that constraint template only checks Pods, not generator resources (Deployments, StatefulSets, etc.), removing |
I gave --audit-match-kind-only=false but still Total Violations: 0. @maxsmythe Can you please suggest something else |
Sorry, that wasn't what I was suggesting. In the contents of your constraint yaml, delete |
this is my constraint template i want to just see violation for kinds : Deployment","StatefulSet","ReplicaSet, i am able to see voilations for my sandbox account not for my nonprod (which is a heavy cluster with lots of deployments), i have changed auditinterval and chunksize as i was facing OOM killed issues, could that be a reason? |
I'm curious what violations you're seeing? Throwing violations for Deployments, etc. that create invalid pods is not something Gatekeeper currently does. |
Fixes open-policy-agent#1783 Signed-off-by: Max Smythe <smythe@google.com>
Fixes #1783 Signed-off-by: Max Smythe <smythe@google.com>
Found the core problem -- this bit of Rego code below was ill-behaved when |
…agent#2038) Fixes open-policy-agent#1783 Signed-off-by: Max Smythe <smythe@google.com> Signed-off-by: davis-haba <davishaba@google.com>
I have installed op-gatekeeper by using following values:
We have a huge cluster and multiple constraints for different namespaces.
I getting Total Violations: 0 which is not correct , in logs getting below error:
The text was updated successfully, but these errors were encountered: