mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
21 lines
388 B
YAML
21 lines
388 B
YAML
---
|
|
apiVersion: kyverno.io/v1
|
|
kind: ClusterPolicy
|
|
metadata:
|
|
name: check-node-port
|
|
spec:
|
|
admission: true
|
|
background: true
|
|
rules:
|
|
- match:
|
|
any:
|
|
- resources:
|
|
kinds:
|
|
- Service
|
|
name: check-node-port
|
|
validate:
|
|
message: NodePort type is not allowed
|
|
pattern:
|
|
spec:
|
|
type: '!NodePort'
|
|
validationFailureAction: Audit
|