Pod Quality of Service (QoS) is a mechanism to ensure Pods receive certain priority guarantees based upon the resources they define. When a Pod has at least one container which defines either requests or limits for either memory or CPU, Kubernetes grants the QoS class as burstable if it does not otherwise qualify for a QoS class of guaranteed. This policy requires that a Pod meet the criteria qualify for a QoS of burstable. This policy is provided with the intention that users will need to control its scope by using exclusions, preconditions, and other policy language mechanisms.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: require-qos-burstableannotations:policies.kyverno.io/title: Require QoS Burstablepolicies.kyverno.io/category: Other, Multi-Tenancypolicies.kyverno.io/severity: mediumpolicies.kyverno.io/subject: Podpolicies.kyverno.io/description: Pod Quality of Service (QoS) is a mechanism to ensure Pods receive certain priority guarantees based upon the resources they define. When a Pod has at least one container which defines either requests or limits for either memory or CPU, Kubernetes grants the QoS class as burstable if it does not otherwise qualify for a QoS class of guaranteed. This policy requires that a Pod meet the criteria qualify for a QoS of burstable. This policy is provided with the intention that users will need to control its scope by using exclusions, preconditions, and other policy language mechanisms.spec:validationFailureAction: Auditbackground: truerules:- name: burstablematch:any:- resources:kinds:- Podvalidate:message: At least one container in the Pod must define either requests or limits for either CPU or memory.deny:conditions:all:- key: requestsoperator: AnyNotInvalue: "{{ request.object.spec.containers[].resources.keys(@)[] }}"- key: limitsoperator: AnyNotInvalue: "{{ request.object.spec.containers[].resources.keys(@)[] }}"
This policy prevents the use of the default project in an Application.
This policy prevents updates to the project field after an Application is created.
This policy ensures that the name of the ApplicationSet is the same value provided in the project.