mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-09 17:37:12 +00:00
20 lines
479 B
YAML
20 lines
479 B
YAML
apiVersion: kyverno.io/v1alpha1
|
||
kind: ClusterPolicy
|
||
metadata:
|
||
name: disallow-node-port
|
||
annotations:
|
||
policies.kyverno.io/category: Security
|
||
policies.kyverno.io/description: Disable exposing the Service on each Node’s IP at a static port
|
||
spec:
|
||
rules:
|
||
- name: disallow-node-port
|
||
match:
|
||
resources:
|
||
kinds:
|
||
- Service
|
||
validate:
|
||
message: "Disallow service of type NodePort"
|
||
pattern:
|
||
spec:
|
||
type: "!NodePort"
|
||
|