istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pilot/pkg/config/kube/gateway/testdata/grpc.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        kinds:
    27        - kind: GRPCRoute
    28  ---
    29  apiVersion: gateway.networking.k8s.io/v1alpha2
    30  kind: GRPCRoute
    31  metadata:
    32    name: grpc
    33    namespace: default
    34  spec:
    35    parentRefs:
    36    - name: gateway
    37      namespace: istio-system
    38    hostnames: ["first.domain.example", "another.domain.example"]
    39    rules:
    40    - matches:
    41      - method:
    42          service: "foo"
    43        headers:
    44        - name: my-header
    45          value: some-value
    46          type: Exact
    47      filters:
    48      - type: RequestHeaderModifier
    49        requestHeaderModifier:
    50          add:
    51          - name: my-added-header
    52            value: added-value
    53          remove: [my-removed-header]
    54      backendRefs:
    55      - name: httpbin
    56        port: 80
    57    - matches:
    58      - method:
    59          type: RegularExpression
    60          method: "bar"
    61      backendRefs:
    62      - name: httpbin
    63        port: 80