Created
March 25, 2020 09:25
-
-
Save swade1987/5c49a8ecbb9e03afb2d6da60047ea664 to your computer and use it in GitHub Desktop.
rego policy example
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
# daemonsets, deployments, replicasets resources under extensions/v1beta1 - use apps/v1 instead | |
_deny = msg { | |
resources := ["DaemonSet", "Deployment", "ReplicaSet"] | |
input.apiVersion == "extensions/v1beta1" | |
input.kind == resources[_] | |
msg := sprintf("%s/%s: API extensions/v1beta1 for %s has been deprecated, use apps/v1 instead.", [input.kind, input.metadata.name, input.kind]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment