Skip to content

feat: support sharing the primary slb with multiple vmSets#578

Merged
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
nilo19:feat/share-slb
Apr 6, 2021
Merged

feat: support sharing the primary slb with multiple vmSets#578
k8s-ci-robot merged 1 commit into
kubernetes-sigs:masterfrom
nilo19:feat/share-slb

Conversation

@nilo19
Copy link
Copy Markdown
Contributor

@nilo19 nilo19 commented Apr 2, 2021

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

/kind feature

What this PR does / why we need it:

This PR enables multiple vmSets sharing the primary SLB. To do this, we need to:

  1. turn on the multiple slbs mode;
  2. store the vmSet names that share the primary SLB to a new cloud config nodePoolsWithoutDedicatedSLB (comma separated).

Note that when switching from dedicated slb to shared slb, the service frontend IP configs would be moved to the primary slb as well, even if there is a mode annotation that selects the original non-primary vmSet. This could cause service downtime for some local services.

Which issue(s) this PR fixes:

Fixes #549

Special notes for your reviewer:

Release note:

feat: support sharing the primary slb with multiple vmSets

@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 Apr 2, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 2, 2021
Comment thread pkg/provider/azure_loadbalancer.go Outdated
Comment on lines 265 to 268
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Want to prevent the 412 error here, even though the error won't break the logic because the retry wouldn't face the 412 error again.

Comment thread pkg/provider/azure_loadbalancer.go Outdated
Comment on lines 540 to 549
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same here

Comment thread pkg/provider/azure_loadbalancer.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

move to defer and only set it to true when the following operations have succeeded.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and need pre-define the err above to catch the error inside defer function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

refactored

Comment thread pkg/provider/azure_loadbalancer.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rename to shouldRemoveVMSetFromSLB()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

renamed

Comment thread pkg/provider/azure_loadbalancer.go Outdated
Comment thread pkg/provider/azure_loadbalancer.go Outdated
Copy link
Copy Markdown
Member

@feiskyer feiskyer 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 6, 2021
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feiskyer, nilo19

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

The pull request process is described here

Details 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

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.

Support sharing the default SLB when enableMultipleStandardLoadBalancers is set to true

3 participants