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

💎 Refactor load balancer scope to interface #771

Merged
merged 1 commit into from
Jul 13, 2020

Conversation

CecileRobertMichon
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon commented Jul 8, 2020

What this PR does / why we need it: Follow up from #716, this PR applies the same pattern to load balancers.

Note that this also combines internal and public load balancers services into one load balancer service (to mirror the Azure load balancer client).

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

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Refactor load balancer scope to interface

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 8, 2020
@k8s-ci-robot k8s-ci-robot requested review from devigned and juan-lee July 8, 2020 21:57
@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Jul 8, 2020
@CecileRobertMichon CecileRobertMichon changed the title [WIP] 💎 refactor load balancer scope to interface [WIP] 💎 refactor load balancer scope to interface Jul 8, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 9, 2020
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Looks clean. Just a question.

cloud/scope/cluster.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 9, 2020
@CecileRobertMichon CecileRobertMichon changed the title [WIP] 💎 refactor load balancer scope to interface 💎 Refactor load balancer scope to interface Jul 9, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2020
lb.LoadBalancerPropertiesFormat.Probes = &[]network.Probe{
{
Name: to.StringPtr(probeName),
ProbePropertiesFormat: &network.ProbePropertiesFormat{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only thing I changed that's not strictly a refactor... The probe for the public LB (api server role) was still using TCP , I changed it to HTTPS to match 316a2a6 since we're using standard LBs everywhere, and it made it simpler to not have a separate probe if/else per role. Tested functional behavior is the same and this change is backwards compatible.

Happy to revert it if reviewers think a separate PR would be more appropriate and we'd rather keep this one as a strict refactor.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for heads up, was about to comment on the if .. else part. But this comment made it clear as to this is just a copy paste rather than a complete refactor.

@CecileRobertMichon
Copy link
Contributor Author

/cc @jsturtevant

@k8s-ci-robot
Copy link
Contributor

@CecileRobertMichon: GitHub didn't allow me to request PR reviews from the following users: jsturtevant.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @jsturtevant

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

cloud/services/loadbalancers/loadbalancers.go Outdated Show resolved Hide resolved
lb.LoadBalancerPropertiesFormat.Probes = &[]network.Probe{
{
Name: to.StringPtr(probeName),
ProbePropertiesFormat: &network.ProbePropertiesFormat{
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for heads up, was about to comment on the if .. else part. But this comment made it clear as to this is just a copy paste rather than a complete refactor.

Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

lgtm

@CecileRobertMichon
Copy link
Contributor Author

@devigned please take another look, rebased and fixed copyright

Copy link
Contributor

@devigned devigned 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 Jul 13, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: devigned

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 Jul 13, 2020
@devigned
Copy link
Contributor

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jul 13, 2020

@CecileRobertMichon: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-provider-azure-apidiff 88d2ced link /test pull-cluster-api-provider-azure-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot merged commit cf24739 into kubernetes-sigs:master Jul 13, 2020
@CecileRobertMichon CecileRobertMichon deleted the refactor-lb branch March 19, 2021 17:55
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. area/provider/azure Issues or PRs related to azure provider 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants