Created
July 22, 2021 09:54
-
-
Save ShubhanjanMedhi-dev/4c46484c0b4ad7a8524ecd617dfef3b1 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
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: require-deployment-label | |
spec: | |
validationFailureAction: enforce | |
rules: | |
- name: require-deployment-label | |
match: | |
resources: | |
kinds: | |
- Deployment | |
validate: | |
message: "Every Deployment object must contain the `company` label." | |
pattern: | |
metadata: | |
labels: | |
company: squadcast |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment