sigs.k8s.io/gateway-api@v1.0.0/conformance/tests/gateway-with-attached-routes.yaml (about)

     1  apiVersion: gateway.networking.k8s.io/v1
     2  kind: Gateway
     3  metadata:
     4    name: gateway-with-one-attached-route
     5    namespace: gateway-conformance-infra
     6  spec:
     7    gatewayClassName: "{GATEWAY_CLASS_NAME}"
     8    listeners:
     9    - name: http
    10      port: 80
    11      protocol: HTTP
    12      allowedRoutes:
    13        kinds:
    14        - kind: HTTPRoute
    15        namespaces:
    16          from: Selector
    17          selector:
    18            matchLabels:
    19              # This label is added automatically as of K8s 1.22
    20              # to all namespaces
    21              kubernetes.io/metadata.name: gateway-conformance-infra
    22  ---
    23  apiVersion: gateway.networking.k8s.io/v1
    24  kind: HTTPRoute
    25  metadata:
    26    name: http-route-1
    27    namespace: gateway-conformance-infra
    28  spec:
    29    parentRefs:
    30    - kind: Gateway
    31      name: gateway-with-one-attached-route
    32      namespace: gateway-conformance-infra
    33    rules:
    34    - backendRefs:
    35      - name: infra-backend-v1
    36        port: 8080
    37  ---
    38  apiVersion: gateway.networking.k8s.io/v1
    39  kind: Gateway
    40  metadata:
    41    name: gateway-with-two-attached-routes
    42    namespace: gateway-conformance-infra
    43  spec:
    44    gatewayClassName: "{GATEWAY_CLASS_NAME}"
    45    listeners:
    46    - name: http
    47      port: 80
    48      protocol: HTTP
    49      allowedRoutes:
    50        kinds:
    51        - kind: HTTPRoute
    52        namespaces:
    53          from: Selector
    54          selector:
    55            matchLabels:
    56              # This label is added automatically as of K8s 1.22
    57              # to all namespaces
    58              kubernetes.io/metadata.name: gateway-conformance-infra
    59  ---
    60  apiVersion: gateway.networking.k8s.io/v1
    61  kind: HTTPRoute
    62  metadata:
    63    name: http-route-2
    64    namespace: gateway-conformance-infra
    65  spec:
    66    parentRefs:
    67    - kind: Gateway
    68      name: gateway-with-two-attached-routes
    69      namespace: gateway-conformance-infra
    70    rules:
    71    - backendRefs:
    72      - name: infra-backend-v1
    73        port: 8080
    74  ---
    75  apiVersion: gateway.networking.k8s.io/v1
    76  kind: HTTPRoute
    77  metadata:
    78    name: http-route-3
    79    namespace: gateway-conformance-infra
    80  spec:
    81    parentRefs:
    82    - kind: Gateway
    83      name: gateway-with-two-attached-routes
    84      namespace: gateway-conformance-infra
    85    rules:
    86    - backendRefs:
    87      - name: infra-backend-v1
    88        port: 8080
    89  ---
    90  apiVersion: gateway.networking.k8s.io/v1beta1
    91  kind: Gateway
    92  metadata:
    93    name: unresolved-gateway-with-one-attached-unresolved-route
    94    namespace: gateway-conformance-infra
    95  spec:
    96    gatewayClassName: "{GATEWAY_CLASS_NAME}"
    97    listeners:
    98    - name: tls
    99      port: 443
   100      protocol: HTTPS
   101      allowedRoutes:
   102        kinds:
   103        - kind: HTTPRoute
   104        namespaces:
   105          from: Selector
   106          selector:
   107            matchLabels:
   108              # This label is added automatically as of K8s 1.22
   109              # to all namespaces
   110              kubernetes.io/metadata.name: gateway-conformance-infra
   111      tls:
   112        certificateRefs:
   113        - group: ""
   114          kind: Secret
   115          name: does-not-exist
   116        mode: Terminate
   117  ---
   118  apiVersion: gateway.networking.k8s.io/v1beta1
   119  kind: HTTPRoute
   120  metadata:
   121    name: http-route-4
   122    namespace: gateway-conformance-infra
   123  spec:
   124    parentRefs:
   125    - kind: Gateway
   126      name: unresolved-gateway-with-one-attached-unresolved-route
   127      namespace: gateway-conformance-infra
   128      sectionName: tls
   129    rules:
   130    - backendRefs:
   131      - name: does-not-exist
   132        port: 8080