OPA Policy #315
Unanswered
cmwatts1974
asked this question in
OPA and Rego
OPA Policy
#315
Replies: 2 comments 8 replies
-
Hey, I think there might be a few missed parts of the paths to fields here. You can see the schema of a request here: https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-request-and-response I've had a go at the policy in the playground, does this look like it could work for you? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am having trouble with a policy to prevent creation of default storage class. I am trying to create an OPA policy that prevents creation or update to a storage class if it contains a annotation and the name of the storage class is not "default"
This is what I have below but that is not quite correct. Any suggestions?
import future.keywords.in
deny[msg] {
input.request.operation = "CREATE"
input.request.kind.kind = "storageclass"
}
Beta Was this translation helpful? Give feedback.
All reactions