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