Skip to content

Data Plane Deployment Fails With Long Listener Name #11926

@ndrpnt

Description

@ndrpnt

kgateway version

v2.0.3

Kubernetes Version

1.32.7

Describe the bug

Pod/Service port names are chosen after the first listener of the corresponding Gateway. That's unfortunate because port names are limited to 15 characters while listener names can be 253 char long. This results in kgateway failing to reconcile the gateway with error failed to apply object: […] spec.template.spec.containers[0].ports[1].name: […] must be no more than 15 characters.

Expected Behavior

Not sure, but I feel like a listener's name over 15 characters long should ideally work, or otherwise trigger a validation error on the Gateway.

Steps to reproduce the bug

cat <<EOF | kubectl apply -f -
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: example
spec:
  gatewayClassName: kgateway
  listeners:
    - hostname: example.com
      name: a-name-over-fifteen-characters-long
      port: 80
      protocol: HTTP 
EOF

Additional Environment Detail

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueGood issue for newbiesType: BugSomething isn't workinghelp wantedDenotes an issue that needs help from a contributor.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions