Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GEP-1762 with Gateway name limit recommendations #3070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sunjayBhatia
Copy link
Member

What type of PR is this?

/kind cleanup
/kind documentation
/kind gep

What this PR does / why we need it:

Updates GEP-1762 to provide guidance for implementers on what to do with the gateway.networking.k8s.io/gateway-name (to be put on generated in-cluster resources) when a Gateway's name exceeds 63 characters (the label value length limit).

Also updates Gateway resource to recommend users create Gateways with <= 63 character names.

Which issue(s) this PR fixes:

Fixes #2592

Does this PR introduce a user-facing change?:

Gateway names are recommended to be no longer than the maximum label value length of 63 characters to ensure compatibility with in-cluster implementations which set the Gateway name as a label on generated resources.

Also updates Gateway resource to recommend users create Gateways
with <= 63 character names.

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. kind/gep PRs related to Gateway Enhancement Proposal(GEP) cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 9, 2024
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 9, 2024
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

thanks !

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sunjayBhatia!

@@ -32,6 +32,10 @@ import (

// Gateway represents an instance of a service-traffic handling infrastructure
// by binding Listeners to a set of IP addresses.
//
// It is recommended that the Gateway name field be limited to a maximum length
// of 63 characters. Gateway names may be used in label values on generated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like 63 is too long if 63 is the max length of some of the values we're trying to populate. Ideally wouldn't you want to translate foo-gateway to a generated contour-foo-gateway or similar? I'm also not sure if this belongs in the API spec or should just be in more user-facing guidelines documentation for using the API.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

63 is the max label value length, this shouldn't have any immediate bearing on generated resource names

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move this to another guide instead though if that is preferred, maybe better here: https://gateway-api.sigs.k8s.io/api-types/gateway/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

63 is the max label value length, this shouldn't have any immediate bearing on generated resource names

🤦 did not read this closely enough, nevermind.

I can move this to another guide instead

We don't really have any strong guidance here as far as where user-facing tips like this belongs. Generally we reserve RFC language like SHOULD and MUST in the API Spec for implementation guidance, but it also feels weird to have "It is recommended" instead of "SHOULD" here. I can't really think of better solutions here, but interested in what @youngnick thinks.

geps/gep-1762/index.md Show resolved Hide resolved
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sunjayBhatia! Let's give a few days for @youngnick to look at this in case he has better ideas for where this guidance could go. If not, I'm fine with some lazy consensus where we can just remove the hold sometime next week if no strong opinions emerge.

/lgtm
/approve
/hold for second opinion

@@ -32,6 +32,10 @@ import (

// Gateway represents an instance of a service-traffic handling infrastructure
// by binding Listeners to a set of IP addresses.
//
// It is recommended that the Gateway name field be limited to a maximum length
// of 63 characters. Gateway names may be used in label values on generated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

63 is the max label value length, this shouldn't have any immediate bearing on generated resource names

🤦 did not read this closely enough, nevermind.

I can move this to another guide instead

We don't really have any strong guidance here as far as where user-facing tips like this belongs. Generally we reserve RFC language like SHOULD and MUST in the API Spec for implementation guidance, but it also feels weird to have "It is recommended" instead of "SHOULD" here. I can't really think of better solutions here, but interested in what @youngnick thinks.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arkodg, robscott, sunjayBhatia

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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