1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-09 17:37:12 +00:00
kyverno/test/policy/validate/check_nodeport.yaml

22 lines
388 B
YAML
Raw Normal View History

---
apiVersion: kyverno.io/v1
2019-10-14 12:36:19 -07:00
kind: ClusterPolicy
metadata:
name: check-node-port
spec:
admission: true
background: true
2019-10-14 12:36:19 -07:00
rules:
- match:
any:
- resources:
kinds:
- Service
name: check-node-port
2019-10-14 12:36:19 -07:00
validate:
message: NodePort type is not allowed
2019-10-14 12:36:19 -07:00
pattern:
spec:
type: '!NodePort'
validationFailureAction: Audit