quorate/vendor/platform/kyverno/tests/gateway-status/kyverno-test.yaml

25 lines
602 B
YAML
Raw Normal View History

apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: gateway-status
policies:
- ../../policies/protect-shared-gateways.yaml
- ../../policies/require-gateway-route-selectors.yaml
resources:
- ../gateway-flux/resources.yaml
variables: values.yaml
userinfo: user.yaml
results:
- policy: protect-shared-gateways
rule: shared-gateway-spec-gitops-only
kind: Gateway
resources: &id001
- gateway-short
- gateway-relay
- gateway-internal
result: skip
- policy: require-gateway-route-selectors
rule: deny-from-all-on-shared-gateways
kind: Gateway
resources: *id001
result: pass