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 fetching retain ports when reconciling SecurityGroup #6401

Merged

Conversation

zarvd
Copy link
Contributor

@zarvd zarvd commented Jun 12, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

  • Refactor the function that retrieves the ports for services using the same external IP.
  • Reduce a call to fetch PublicIP.
  • Add unit test cases.

Which issue(s) this PR fixes:

Fixes #6151

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix updating NSG rules when disabling floating IP 

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 12, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @zarvd. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 12, 2024
@zarvd zarvd force-pushed the refactor/tidy-access-control branch 7 times, most recently from 611df66 to 71bff3b Compare June 17, 2024 01:14
@nilo19
Copy link
Contributor

nilo19 commented Jun 17, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 17, 2024
@@ -2919,17 +2814,12 @@ func (az *Cloud) reconcileSecurityGroup(
WithValues("delete-lb", !wantLb)
logger.V(2).Info("Starting")

ctx := klog.NewContext(context.Background(), logger)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using context from outside caller?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am thinking so, will do it in another logging refactor PR.

@nilo19
Copy link
Contributor

nilo19 commented Jun 17, 2024

Do you consider internal/testutil -> testutil/?

@zarvd zarvd force-pushed the refactor/tidy-access-control branch from 71bff3b to 4643586 Compare June 17, 2024 04:48
@zarvd
Copy link
Contributor Author

zarvd commented Jun 17, 2024

Do you consider internal/testutil -> testutil/?

I am thinking not to export this pkg, and maybe some more

@nilo19
Copy link
Contributor

nilo19 commented Jun 17, 2024

Do you consider internal/testutil -> testutil/?

I am thinking not to export this pkg, and maybe some more

Then I think we should include this change within the pr.

@nilo19
Copy link
Contributor

nilo19 commented Jun 17, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2024
@zarvd
Copy link
Contributor Author

zarvd commented Jun 17, 2024

/retest

@zarvd zarvd force-pushed the refactor/tidy-access-control branch from 4643586 to 0fc9a54 Compare June 17, 2024 16:20
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2024
@zarvd zarvd force-pushed the refactor/tidy-access-control branch from 0fc9a54 to 4c1084f Compare June 18, 2024 07:19
@zarvd zarvd force-pushed the refactor/tidy-access-control branch from 4c1084f to 4f1f24a Compare June 19, 2024 02:35
@MartinForReal
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MartinForReal, zarvd

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 Jun 20, 2024
@MartinForReal
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 20, 2024
@coveralls
Copy link

Coverage Status

Changes unknown
when pulling 4f1f24a on zarvd:refactor/tidy-access-control
into ** on kubernetes-sigs:master**.

@k8s-ci-robot k8s-ci-robot merged commit 2a1d02a into kubernetes-sigs:master Jun 20, 2024
17 of 18 checks passed
@zarvd zarvd deleted the refactor/tidy-access-control branch June 20, 2024 01:46
@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 release-note-none Denotes a PR that doesn't merit a release note. labels Jul 3, 2024
@zarvd
Copy link
Contributor Author

zarvd commented Jul 3, 2024

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 3, 2024
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/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
5 participants