Created
July 23, 2021 17:40
-
-
Save ashutosh-narkar/d6c5dc890c01cd981d42b6511044bebb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kubernetes.validating.deny_host_namespaces | |
deny[msg] { | |
input.request.kind.kind == "Pod" | |
input.request.object.spec.hostNetwork == true | |
msg := "Pod cannot be created with hostNetwork enabled." | |
} | |
deny[msg] { | |
input.request.kind.kind == "Pod" | |
input.request.object.spec.hostPID == true | |
msg := "Pod cannot be created with hostPID enabled." | |
} | |
deny[msg] { | |
input.request.kind.kind == "Pod" | |
input.request.object.spec.hostIPC == true | |
msg := "Pod cannot be created with hostIPC enabled." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment