Skip to content

Handle duplicate kinds in listener allowed kinds #2346

Open
@kate-osborn

Description

@kate-osborn

It's possible for a user to configure the following listener:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway
spec:
  gatewayClassName: nginx
  listeners:
  - name: http
    port: 80
    protocol: HTTP
    hostname: "*.example.com"
    allowedRoutes:
      kinds:
        - kind: HTTPRoute
        - kind: HTTPRoute

which has duplicate kinds in the allowedRoutes field. NGF then writes those duplicate kinds back to the status in the supported kinds field:

Supported Kinds:
  Group:  gateway.networking.k8s.io
  Kind:   HTTPRoute
  Group:  gateway.networking.k8s.io
  Kind:   HTTPRoute

A/C:

  • Remove any duplicate kinds from SupportedKinds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions