...

Text file src/sigs.k8s.io/gateway-api/conformance/tests/tlsroute-invalid-reference-grant.yaml

Documentation: sigs.k8s.io/gateway-api/conformance/tests

     1---
     2apiVersion: gateway.networking.k8s.io/v1beta1
     3kind: ReferenceGrant
     4metadata:
     5  name: reference-grant-wrong-namespace
     6  namespace: gateway-conformance-infra
     7spec:
     8  from:
     9    - group: gateway.networking.k8s.io
    10      kind: TLSRoute
    11      namespace: gateway-conformance-infra
    12  to:
    13    - group: ""
    14      kind: Service
    15      name: tls-backend
    16---
    17apiVersion: gateway.networking.k8s.io/v1beta1
    18kind: ReferenceGrant
    19metadata:
    20  name: reference-grant-wrong-from-group
    21  namespace: gateway-conformance-app-backend
    22spec:
    23  from:
    24    - group: not-the-group-youre-looking-for
    25      kind: TLSRoute
    26      namespace: gateway-conformance-infra
    27  to:
    28    - group: ""
    29      kind: Service
    30      name: tls-backend
    31---
    32apiVersion: gateway.networking.k8s.io/v1beta1
    33kind: ReferenceGrant
    34metadata:
    35  name: reference-grant-wrong-from-kind
    36  namespace: gateway-conformance-app-backend
    37spec:
    38  from:
    39    - group: gateway.networking.k8s.io
    40      kind: Gateway
    41      namespace: gateway-conformance-infra
    42  to:
    43    - group: ""
    44      kind: Service
    45      name: tls-backend
    46---
    47apiVersion: gateway.networking.k8s.io/v1beta1
    48kind: ReferenceGrant
    49metadata:
    50  name: reference-grant-wrong-from-namespace
    51  namespace: gateway-conformance-app-backend
    52spec:
    53  from:
    54    - group: gateway.networking.k8s.io
    55      kind: TLSRoute
    56      namespace: not-the-namespace-youre-looking-for
    57  to:
    58    - group: ""
    59      kind: Service
    60      name: tls-backend
    61---
    62apiVersion: gateway.networking.k8s.io/v1beta1
    63kind: ReferenceGrant
    64metadata:
    65  name: reference-grant-wrong-to-group
    66  namespace: gateway-conformance-app-backend
    67spec:
    68  from:
    69    - group: gateway.networking.k8s.io
    70      kind: TLSRoute
    71      namespace: gateway-conformance-infra
    72  to:
    73    - group: not-the-group-youre-looking-for
    74      kind: Service
    75      name: tls-backend
    76---
    77apiVersion: gateway.networking.k8s.io/v1beta1
    78kind: ReferenceGrant
    79metadata:
    80  name: reference-grant-wrong-to-kind
    81  namespace: gateway-conformance-app-backend
    82spec:
    83  from:
    84    - group: gateway.networking.k8s.io
    85      kind: TLSRoute
    86      namespace: gateway-conformance-infra
    87  to:
    88    - group: ""
    89      kind: Secret
    90      name: tls-backend
    91---
    92apiVersion: gateway.networking.k8s.io/v1beta1
    93kind: ReferenceGrant
    94metadata:
    95  name: reference-grant-wrong-to-name
    96  namespace: gateway-conformance-app-backend
    97spec:
    98  from:
    99    - group: gateway.networking.k8s.io
   100      kind: TLSRoute
   101      namespace: gateway-conformance-infra
   102  to:
   103    - group: ""
   104      kind: Service
   105      name: not-the-service-youre-looking-for
   106---
   107apiVersion: gateway.networking.k8s.io/v1alpha2
   108kind: TLSRoute
   109metadata:
   110  name: gateway-conformance-infra-test
   111  namespace: gateway-conformance-infra
   112spec:
   113  parentRefs:
   114    - name: gateway-tlsroute-referencegrant
   115  hostnames:
   116    - abc.example.com
   117  rules:
   118    - backendRefs:
   119        - name: tls-backend
   120          namespace: gateway-conformance-app-backend
   121          port: 443
   122---
   123apiVersion: gateway.networking.k8s.io/v1beta1
   124kind: Gateway
   125metadata:
   126  name: gateway-tlsroute-referencegrant
   127  namespace: gateway-conformance-infra
   128spec:
   129  gatewayClassName: "{GATEWAY_CLASS_NAME}"
   130  listeners:
   131    - name: https
   132      port: 443
   133      protocol: TLS
   134      hostname: "*.example.com"
   135      allowedRoutes:
   136        namespaces:
   137          from: Same
   138        kinds:
   139          - kind: TLSRoute
   140      tls:
   141        mode: Passthrough

View as plain text