1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/test/policy/query/policy_validate_loadblancer.yaml
2019-11-13 13:56:20 -08:00

16 lines
No EOL
359 B
YAML

apiVersion : kyverno.io/v1
kind: ClusterPolicy
metadata:
name: query1
spec:
rules:
- name: Max one service of type LoadBalancer in namespace test
match:
resources:
kinds:
- Service
namespaces:
- test
query:
query: "length([?spec.type=='LoadBalancer'])"
expectedResult: "<=1"