Issues with the default libraries of OPA Gatekeeper #62
Unanswered
vruask
asked this question in
Gatekeeper
Replies: 1 comment 8 replies
-
Can you run If there are audit results, then we know the problem is with the webhook specifically, not with the constraint or template. If the webhook isn't functioning and the webhook pods look healthy, the usual explanation is some kind of networking error, like a firewall. |
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
-
Hey all, I'm trying to configure the constraint template taken from https://github.com/open-policy-agent/gatekeeper-library/blob/master/library/pod-security-policy/host-namespaces/template.yaml along with its constraint taken from https://github.com/open-policy-agent/gatekeeper-library/blob/master/library/pod-security-policy/host-namespaces/samples/psp-host-namespace/constraint.yaml
Procedure followed:
kubectl apply -f template.yaml
to configure the template. Got the responseconstrainttemplate.templates.gatekeeper.sh/k8spsphostnamespace created
kubectl apply -f constraint.yaml
to configure the constraint. Got the responsek8spsphostnamespace.constraints.gatekeeper.sh/psp-host-namespace created
kubectl apply -f samplepod.yaml
Expected behavior: The pod is prevented from being created, because the hostPID and hostIPC = true. The pod
should be created only if the value is false.
Actual behavior: Pod gets created:
pod/httpd-server created
. The same behavior occurs, if hostPID and hostIPC = false. The logs are attached for both audit and controller-manager pods.audit.log
controller-man.log
Not sure what I'm doing wrong here, since its basically the same template. Looking forward to your response!
Beta Was this translation helpful? Give feedback.
All reactions