Skip to content

Given GEP-957 how to mark status of routes not matching neither port nor hostname of parentRef? #1532

@shaneutt

Description

@shaneutt

Discussed in #1512

Originally posted by pmalek November 7, 2022
Given GEP-957 where one can define parentRef.port on a route, as well as already introduced hostname matching (that can be seen e.g. in HTTPRoute: https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteSpec) how does one set the status of a route if none of the specified port nor hostname match the listener?

E.g. given the example below, what should be set in the route status?

---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
  name: gateway1
spec:
  gatewayClassName: gatewayclass1
  listeners:
  - name: http
    protocol: HTTP
    port: 80
    hostname: hostname0.example
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  name: httpbin
  namespace: default
  annotations:
    konghq.com/strip-path: "true"
spec:
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: gateway1
    port: 81
  hostnames:
  - hostname1.example
  rules:
  - backendRefs:
    - kind: Service
      name: httpbin
      port: 80
      weight: 1
    matches:
    - path:
        type: PathPrefix
        value: /httpbin

I've noticed there is already an open discussion on similar topic : #1445 but it doesn't touch this particular case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions