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

✨ Support cluster names > 22 characters in length #1290

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

randomvariable
Copy link
Member

What this PR does / why we need it:

  • Replaces "." in the ELB name with "-" making them compatible with the ELB API.
  • Additionally, if the original, computed ELB name is more than 32 characters, then
    use a truncated form of Blake2b to compute a consistent hash formatted ELB name.
    Think this approach has a sufficiently low risk of collisions. "apiserver" suffix is
    replaced with "k8s" to regain some entropy. Names arrive in the format of:
    • 26o3cjil5at5qn27vukn5x09b3ql-k8s
    • t8gnrbbifaaf5d0k4xmwui3xwvip-k8s
      etc...

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #977
Fixes #889

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 29, 2019
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 29, 2019
go.mod Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
@vincepri vincepri added this to the v0.5.0 milestone Oct 29, 2019
Copy link
Member

@detiber detiber left a comment

Choose a reason for hiding this comment

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

I kind of wish we could keep part of the cluster name as a prefix to make it a bit user friendlier. That said, we are still applying a tag for the cluster name, so users can filter on that.

I'm also wondering if we should update the default to the hashed naming and just provide a fallback in the call to DescribeLoadBalancers by passing in both the hashed and <clustername>-apiserver names?

pkg/cloud/services/elb/loadbalancer.go Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/cloud/services/elb/loadbalancer.go Outdated Show resolved Hide resolved
pkg/encoding/base36.go Outdated Show resolved Hide resolved
pkg/hash/base36.go Outdated Show resolved Hide resolved
Signed-off-by: Naadir Jeewa <jeewan@vmware.com>
@detiber
Copy link
Member

detiber commented Nov 7, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 7, 2019
@ncdc
Copy link
Contributor

ncdc commented Nov 7, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc, randomvariable

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 Nov 7, 2019
@k8s-ci-robot k8s-ci-robot merged commit d2b5087 into kubernetes-sigs:master Nov 7, 2019
@randomvariable randomvariable deleted the lb-name branch May 26, 2020 11:53
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
5 participants