Created
October 30, 2020 08:20
-
-
Save bharatmicrosystems/1c79afbf05e845c55207cc6dc3aaa3ff 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: check-resources | |
spec: | |
validationFailureAction: enforce | |
rules: | |
- name: check-pod-resources | |
match: | |
resources: | |
kinds: | |
- Pod | |
validate: | |
message: "CPU and memory resource requests and limits are required" | |
pattern: | |
spec: | |
containers: | |
- name: "*" | |
resources: | |
limits: | |
memory: "?*" | |
cpu: "?*" | |
requests: | |
memory: "?*" | |
cpu: "?*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment