1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/test/more/restrict_loadbalancer.yaml
Charles-Edouard Brétéché 7562bea6db
chore: apply policy fixes (#8427)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2023-09-17 22:24:26 +00:00

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