feat: init commit

This commit is contained in:
2023-01-17 22:45:23 +08:00
commit 94130c107c
72 changed files with 7568 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
package policy
violation[{"msg": msg}] {
object_namespace := input.review.object.metadata.namespace
satisfied := [allowed_namespace | namespace = input.parameters.allowed_namespaces[_]; allowed_namespace = object_namespace == namespace]
not any(satisfied)
msg := sprintf("object created under an invalid namespace %s; allowed namespaces are %v", [object_namespace, input.parameters.allowed_namespaces])
}