mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com> Co-authored-by: shuting <shuting@nirmata.com>
21 lines
426 B
YAML
21 lines
426 B
YAML
apiVersion: kyverno.io/v2beta1
|
|
kind: PolicyException
|
|
metadata:
|
|
name: container-exception
|
|
spec:
|
|
exceptions:
|
|
- policyName: max-containers
|
|
ruleNames:
|
|
- max-two-containers
|
|
- autogen-max-two-containers
|
|
match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Pod
|
|
- Deployment
|
|
conditions:
|
|
any:
|
|
- key: "{{ request.object.metadata.labels.color || '' }}"
|
|
operator: Equals
|
|
value: blue
|