1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/examples/validate/check_nodeport.yaml

16 lines
281 B
YAML
Raw Normal View History

apiVersion : kyverno.io/v1alpha1
kind: Policy
metadata:
2019-05-23 20:42:34 -07:00
name: check-node-port
spec:
rules:
2019-05-23 20:42:34 -07:00
- name: check-node-port
resource:
2019-05-23 20:37:11 +03:00
kinds:
- Service
validate:
2019-05-23 20:42:34 -07:00
message: "NodePort type is not allowed"
pattern:
spec:
2019-05-23 20:42:34 -07:00
type: "!NodePort"