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

Allow to set custom backend pool names for load balancers #2714

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

Fedosin
Copy link

@Fedosin Fedosin commented Oct 9, 2022

What type of PR is this?
/kind feature

What this PR does / why we need it:
Currently, there is no way to specify the backend pool name. This PR makes LB's backend pool name customizable. The changes introduced in this PR are backward compatible and should not break existing deployments.

Special notes for your reviewer:
Adding a struct Backend to API allows for future expansion of the configuration. If we later wanted to add some additional config, it would be preferable to have them all in a struct rather than BackendPoolName, BackendPoolPort, etc

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Allow to set custom backend pool names for load balancers

@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/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 9, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 9, 2022
@JoelSpeed
Copy link
Contributor

Thanks for picking this up from #2432
/lgtm

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

Thanks for picking this up @Fedosin! it looks like this is missing some of the changes that were made as part of the review that already happened on #2432, could you please make sure you're reconciling those?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 13, 2022
@Fedosin
Copy link
Author

Fedosin commented Oct 17, 2022

@CecileRobertMichon Hi! I updated the PR as you asked. Could you take a look again?

@JoelSpeed JoelSpeed mentioned this pull request Nov 1, 2022
3 tasks
api/v1beta1/azurecluster_default.go Outdated Show resolved Hide resolved
// Name specifies the name of backend pool for the load balancer. If not specified, the default name will
// be set, depending on the load balancer role.
// +optional
Name *string `json:"name,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

is there value in making this a string pointer given that "" will never be a valid name? If it was just a string it would avoid having to dereference it in a bunch of places (and it would be more consistent with other Name fields in the API)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I agree. I copied it from the original PR where Name is a pointer. I updated it as you asked.

azure/scope/cluster.go Outdated Show resolved Hide resolved
@CecileRobertMichon
Copy link
Contributor

/cc @nawazkh @willie-yao for additional 👀

@Fedosin Fedosin force-pushed the backendpool branch 3 times, most recently from 27d3268 to c1c3f79 Compare November 23, 2022 19:05
Copy link
Member

@nawazkh nawazkh left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together!
/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 29, 2022
@CecileRobertMichon
Copy link
Contributor

@Fedosin please squash

@willie-yao
Copy link
Contributor

/lgtm

Currently, there is no way to specify the backend pool name.
This PR makes LB's backend pool name customizable.
The changes introduced in this PR are backward compatible and
should not break existing deployments.
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 30, 2022
@Fedosin
Copy link
Author

Fedosin commented Nov 30, 2022

@CecileRobertMichon now it's squashed

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you @nawazkh @willie-yao for reviewing 🙌

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 30, 2022
@k8s-ci-robot k8s-ci-robot merged commit 0d2bbb9 into kubernetes-sigs:main Nov 30, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.7 milestone Nov 30, 2022
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. kind/feature Categorizes issue or PR as related to a new feature. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants