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

25 lines
586 B
YAML
Raw Permalink Normal View History

apiVersion: cli.kyverno.io/v1alpha1
kind: Test
metadata:
name: gateway-denied
policies:
- ../../policies/protect-shared-gateways.yaml
- ../../policies/require-gateway-route-selectors.yaml
resources:
- 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: fail
- policy: require-gateway-route-selectors
rule: deny-from-all-on-shared-gateways
kind: Gateway
resources: *id001
result: fail