Created
October 30, 2020 08:23
-
-
Save bharatmicrosystems/635dc84688d29ec76226103299f806df to your computer and use it in GitHub Desktop.
This file contains hidden or 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-app-label | |
spec: | |
validationFailureAction: enforce | |
rules: | |
- name: check-for-app-label | |
match: | |
resources: | |
kinds: | |
- Pod | |
validate: | |
message: "label `app` is required" | |
pattern: | |
metadata: | |
labels: | |
app: "?*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment