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

feat: truncate long labels in nodebalancers #125

Merged

Conversation

wbh1
Copy link
Collaborator

@wbh1 wbh1 commented Mar 8, 2023

Nodebalancer backends can have a max label length of 32 chars.

If a k8s node's name is longer than 32 chars, creating a nodebalancer fails.

Example error:

E0307 22:31:47.275176       1 controller.go:307] error processing service traefik/traefik (will retry):
failed to ensure load balancer: [400] [configs[0].nodes[0].label] Length must be 3-32 characters;
[configs[0].nodes[1].label] Length must be 3-32 characters;
[configs[0].nodes[2].label] Length must be 3-32 characters;

General:

  • Have you removed all sensitive information, including but not limited to access keys and passwords?
  • Have you checked to ensure there aren't other open or closed Pull Requests for the same bug/feature/question?

Pull Request Guidelines:

  1. Does your submission pass tests?
  2. Have you added tests?
  3. Are you addressing a single feature in this PR?
  4. Are your commits atomic, addressing one change per commit?
  5. Are you following the conventions of the language?
  6. Have you saved your large formatting changes for a different PR, so we can focus on your work?
  7. Have you explained your rationale for why this feature is needed?
  8. Have you linked your PR to an open issue

@dennisme
Copy link

dennisme commented Mar 9, 2023

+1 looks great!

wbh1 added 2 commits November 28, 2023 16:11
Nodebalancer backends can have a max label length of 32 chars.

If a k8s node's name is longer than 32 chars, creating a nodebalancer fails.

Example error:
E0307 22:31:47.275176       1 controller.go:307] error processing service traefik/traefik (will retry): failed to ensure load balancer: [400] [configs[0].nodes[0].label] Length must be 3-32 characters; [configs[0].nodes[1].label] Length must be 3-32 characters; [configs[0].nodes[2].label] Length must be 3-32 characters;
Nodebalancers must have a name that is 3-32 characters in length.
This adds support to pad the node name if it's too short,
since in Kubernetes it's valid to have node names of only
1 or 2 characters.
@wbh1 wbh1 force-pushed the feat/trim-nodebalancer-backend-labels branch from 6326eb2 to 7d957dc Compare November 28, 2023 21:12
@wbh1
Copy link
Collaborator Author

wbh1 commented Nov 28, 2023

(Rebased after #141)

@luthermonson luthermonson merged commit 8086249 into linode:master Nov 29, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants