mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
28 lines
596 B
YAML
28 lines
596 B
YAML
apiVersion: kyverno.io/v2beta1
|
|
kind: PolicyException
|
|
metadata:
|
|
name: pod-security-exception
|
|
namespace: policy-exception-ns-3
|
|
spec:
|
|
exceptions:
|
|
- policyName: psa-3
|
|
ruleNames:
|
|
- baseline
|
|
match:
|
|
any:
|
|
- resources:
|
|
namespaces:
|
|
- staging-ns-3
|
|
podSecurity:
|
|
- controlName: "Host Ports"
|
|
images:
|
|
- nginx
|
|
restrictedField: "spec.containers[*].ports[*].hostPort"
|
|
values:
|
|
- "10"
|
|
- controlName: "Host Ports"
|
|
images:
|
|
- nginx
|
|
restrictedField: "spec.initContainers[*].ports[*].hostPort"
|
|
values:
|
|
- "20"
|