istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/config/kube/gateway/testdata/zero.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: gateway
    12    namespace: istio-system
    13  spec:
    14    addresses:
    15    - value: istio-ingressgateway
    16      type: Hostname
    17    gatewayClassName: istio
    18    listeners:
    19    - name: default
    20      hostname: "*.domain.example"
    21      port: 80
    22      protocol: HTTP
    23      allowedRoutes:
    24        namespaces:
    25          from: All
    26    - name: tcp
    27      port: 34000
    28      protocol: TCP
    29      allowedRoutes:
    30        namespaces:
    31          from: All
    32  ---
    33  apiVersion: gateway.networking.k8s.io/v1beta1
    34  kind: HTTPRoute
    35  metadata:
    36    name: http
    37    namespace: default
    38  spec:
    39    parentRefs:
    40    - name: gateway
    41      namespace: istio-system
    42    hostnames: ["first.domain.example"]
    43    rules:
    44    - matches:
    45      - path:
    46          type: PathPrefix
    47          value: /get
    48      backendRefs:
    49        - name: httpbin-zero
    50          port: 8080
    51          weight: 0
    52    - matches:
    53      - path:
    54          type: PathPrefix
    55          value: /weighted-100
    56      backendRefs:
    57      - filters:
    58        - requestHeaderModifier:
    59            add:
    60            - name: foo
    61              value: bar
    62          type: RequestHeaderModifier
    63        port: 8000
    64        name: foo-svc
    65        weight: 100
    66  ---
    67  apiVersion: gateway.networking.k8s.io/v1alpha2
    68  kind: TCPRoute
    69  metadata:
    70    name: tcp
    71    namespace: default
    72  spec:
    73    parentRefs:
    74    - name: gateway
    75      namespace: istio-system
    76    rules:
    77    - backendRefs:
    78        - name: httpbin-zero
    79          port: 8080
    80          weight: 0