istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/config/kube/gateway/testdata/alias.yaml (about)

     1  apiVersion: gateway.networking.k8s.io/v1beta1
     2  kind: GatewayClass
     3  metadata:
     4    name: istio
     5  spec:
     6    controllerName: istio.io/gateway-controller
     7  ---
     8  apiVersion: gateway.networking.k8s.io/v1beta1
     9  kind: Gateway
    10  metadata:
    11    name: third-party-gateway
    12    namespace: istio-system
    13  spec:
    14    addresses:
    15    - value: istio-ingressgateway
    16      type: Hostname
    17    gatewayClassName: third-party-gatewayclass
    18    listeners:
    19    - name: default
    20      hostname: "*.domain.example"
    21      port: 80
    22      protocol: HTTP
    23      allowedRoutes:
    24        namespaces:
    25          from: All
    26  ---
    27  apiVersion: gateway.networking.k8s.io/v1beta1
    28  kind: Gateway
    29  metadata:
    30    name: gateway
    31    namespace: istio-system
    32    annotations:
    33      gateway.istio.io/alias-for: third-party-gateway
    34  spec:
    35    addresses:
    36    - value: istio-ingressgateway
    37      type: Hostname
    38    gatewayClassName: istio
    39    listeners:
    40    - name: default
    41      hostname: "*.domain.example"
    42      port: 80
    43      protocol: HTTP
    44      allowedRoutes:
    45        namespaces:
    46          from: All
    47  ---
    48  apiVersion: gateway.networking.k8s.io/v1beta1
    49  kind: HTTPRoute
    50  metadata:
    51    name: http
    52    namespace: default
    53  spec:
    54    parentRefs:
    55    - name: third-party-gateway
    56      namespace: istio-system
    57    hostnames: ["first.domain.example", "another.domain.example"]
    58    rules:
    59    - matches:
    60      - path:
    61          type: PathPrefix
    62          value: /
    63      backendRefs:
    64      - name: httpbin
    65        port: 80