istio.io/istio@v0.0.0-20240520182934-d79c90f27776/tests/integration/security/policy_attachment_only/testdata/authz/gateway-api.yaml.tmpl (about) 1 apiVersion: gateway.networking.k8s.io/v1beta1 2 kind: Gateway 3 metadata: 4 name: {{ .To.ServiceName }}-gateway 5 spec: 6 gatewayClassName: istio 7 listeners: 8 - name: http 9 # Exposing port 80 isn't the recommended security practice 10 port: 80 11 protocol: HTTP 12 hostname: "*.{{ .To.ServiceName }}.com" 13 --- 14 apiVersion: gateway.networking.k8s.io/v1beta1 15 kind: HTTPRoute 16 metadata: 17 name: {{ .To.ServiceName }} 18 spec: 19 parentRefs: 20 - name: {{ .To.ServiceName }}-gateway 21 hostnames: 22 - "*.{{ .To.ServiceName }}.com" 23 rules: 24 - matches: 25 - path: 26 type: PathPrefix 27 value: /allow 28 method: GET 29 backendRefs: 30 - name: "{{ .To.ServiceName }}" 31 port: {{ (.To.PortForName `http`).ServicePort }}