# istio_reference-grant-multiple-to.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: istio
spec:
  controllerName: istio.io/gateway-controller
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway
  namespace: bookinfo-ingress
spec:
  addresses:
  - value: istio-ingressgateway
    type: Hostname
  gatewayClassName: istio
  listeners:
  - allowedRoutes:
      namespaces:
        from: All
    hostname: "*.example.com"
    name: default
    port: 443
    protocol: HTTPS
    tls:
      certificateRefs:
      - group: ""
        kind: Secret
        name: bookinfo-secret
        namespace: bookinfo
      mode: Terminate
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: k8s-gateway-secret-grant
  namespace: bookinfo
spec:
  from:
  - group: gateway.networking.k8s.io
    kind: Gateway
    namespace: bookinfo-ingress
  to:
  - group: ""
    kind: Secret
    name: bookinfo-secret
  - group: ""
    kind: Secret
    name: another-secret