gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

GEP-1762 needs clarification on long Gateway names > 63 characters

Open sunjayBhatia opened this issue 1 year ago • 15 comments

What happened:

Prior to GEP-1762, Contour's Gateway provisioner has been adding a label to resources to denote which Gateway "owns" it: projectcontour.io/owning-gateway-name set to the Gateway name.

While reviewing https://github.com/kubernetes-sigs/gateway-api/pull/2582 with Contour and also implementing the Gateway infrastructure labels feature, we realized that Gateway names longer than 63 characters cause failures to create resources generated with this label.

While this can be solved for Contour's implementation-specific labels with a hash or some other solution, this is not exclusive to Contour, the upstream GEP-1762 also has requirements that may cause many implementations to run into this. Also, including a conformance test that exhibits this may be problematic for some implementations.

@skriss pointed out as well that GEP-1762 makes this same type of label, including the "owning" Gateway as the value, required for implementations that generate deployment resources dynamically: https://gateway-api.sigs.k8s.io/geps/gep-1762/#automated-deployments

What you expected to happen:

GEP-1762 should be amended to describe what to do with the gateway.networking.k8s.io/gateway-name label when dealing with a Gateway with a long name.

How to reproduce it (as minimally and precisely as possible):

Run the conformance test HTTPRouteInvalidParentRefSectionNameNotMatchingPort (on main) with Contour, or create a Gateway with a name longer than 63 characters and have Contour reconcile it.

Anything else we need to know?:

Hashing a long Gateway name and setting that as the value of may be an answer, however that means we will lose the immediate human readability of this feature.

Another solution would be to limit Gateway names to < 63 characters and longer names would not be Accepted by implementations.

sunjayBhatia avatar Nov 17 '23 15:11 sunjayBhatia