Pod Quality of Service (QoS) is a mechanism to ensure Pods receive certain priority guarantees based upon the resources they define. When Pods define both requests and limits for both memory and CPU, and the requests and limits are equal to each other, Kubernetes grants the QoS class as guaranteed which allows them to run at a higher priority than others. This policy requires that all containers within a Pod run with this definition resulting in a guaranteed QoS. 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-guaranteedannotations:policies.kyverno.io/title: Require QoS Guaranteedpolicies.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 Pods define both requests and limits for both memory and CPU, and the requests and limits are equal to each other, Kubernetes grants the QoS class as guaranteed which allows them to run at a higher priority than others. This policy requires that all containers within a Pod run with this definition resulting in a guaranteed QoS. 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: guaranteedmatch:any:- resources:kinds:- Podvalidate:message: All containers must define memory and CPU requests and limits where they are equal.foreach:- list: request.object.spec.containerspattern:resources:requests:cpu: "?*"memory: "?*"limits:cpu: "{{element.resources.requests.cpu}}"memory: "{{element.resources.requests.memory}}"
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 prevents updates to the project field after an Application is created.