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

Fix: remove shared security rule when no svc with shared-nsg annotation exists #3391

Merged

Conversation

MartinForReal
Copy link
Contributor

@MartinForReal MartinForReal commented Feb 20, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

remove shared security rule when no svc with shared-nsg annotation exists

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix: remove unsed shared nsg rule when there is no svc having azure-shared-securityrule annotations set

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


@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Feb 20, 2023
@netlify
Copy link

netlify bot commented Feb 20, 2023

Deploy Preview for kubernetes-sigs-cloud-provide-azure canceled.

Name Link
🔨 Latest commit a894df4
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cloud-provide-azure/deploys/63f45b2745d55800088fba1f

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 20, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2023
@MartinForReal MartinForReal changed the title fix: remove shared security rule when svc with shared-nsg annotation … Fix: remove shared security rule when svc with shared-nsg annotation … Feb 20, 2023
@MartinForReal MartinForReal changed the title Fix: remove shared security rule when svc with shared-nsg annotation … Fix: remove shared security rule when no svc with shared-nsg annotation exists Feb 20, 2023
@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 Feb 20, 2023
@coveralls
Copy link

coveralls commented Feb 20, 2023

Coverage Status

Coverage: 79.525% (-0.0008%) from 79.526% when pulling f7a7d93 on MartinForReal:remove_shared_rule into 7a494eb on kubernetes-sigs:master.

@MartinForReal
Copy link
Contributor Author

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind labels Feb 20, 2023
@MartinForReal MartinForReal force-pushed the remove_shared_rule branch 2 times, most recently from ba89a00 to f7a7d93 Compare February 20, 2023 11:02
@feiskyer
Copy link
Member

Could you add an e2e test for the issue?

@MartinForReal
Copy link
Contributor Author

there is already one test case for this scenario.

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.26

@k8s-infra-cherrypick-robot

@MartinForReal: once the present PR merges, I will cherry-pick it on top of release-1.26 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.26

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.

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.25

@k8s-infra-cherrypick-robot

@MartinForReal: once the present PR merges, I will cherry-pick it on top of release-1.25 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.25

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.

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.24

@k8s-infra-cherrypick-robot

@MartinForReal: once the present PR merges, I will cherry-pick it on top of release-1.24 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.24

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.

@MartinForReal
Copy link
Contributor Author

/cherrypick release-1.23

@k8s-infra-cherrypick-robot

@MartinForReal: once the present PR merges, I will cherry-pick it on top of release-1.23 in a new PR and assign it to you.

In response to this:

/cherrypick release-1.23

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.

Copy link
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

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [MartinForReal,feiskyer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nilo19
Copy link
Contributor

nilo19 commented Feb 21, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2023
…is deleted

Signed-off-by: MartinForReal <fanshangxiang@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2023
@MartinForReal
Copy link
Contributor Author

e2e case is modified.

@jwtty
Copy link
Member

jwtty commented Feb 21, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2023
@k8s-ci-robot k8s-ci-robot merged commit 3972346 into kubernetes-sigs:master Feb 21, 2023
@k8s-infra-cherrypick-robot

@MartinForReal: #3391 failed to apply on top of branch "release-1.25":

Applying: fix: remove shared security rule when svc with shared-nsg annotation is deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	tests/e2e/network/network_security_group.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/network_security_group.go
CONFLICT (content): Merge conflict in tests/e2e/network/network_security_group.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: remove shared security rule when svc with shared-nsg annotation is deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.25

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.

@k8s-infra-cherrypick-robot

@MartinForReal: #3391 failed to apply on top of branch "release-1.24":

Applying: fix: remove shared security rule when svc with shared-nsg annotation is deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	tests/e2e/network/network_security_group.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/network_security_group.go
CONFLICT (content): Merge conflict in tests/e2e/network/network_security_group.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: remove shared security rule when svc with shared-nsg annotation is deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.24

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.

@k8s-infra-cherrypick-robot

@MartinForReal: #3391 failed to apply on top of branch "release-1.23":

Applying: fix: remove shared security rule when svc with shared-nsg annotation is deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	tests/e2e/network/network_security_group.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/network_security_group.go
CONFLICT (content): Merge conflict in tests/e2e/network/network_security_group.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: remove shared security rule when svc with shared-nsg annotation is deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.23

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.

@k8s-infra-cherrypick-robot

@MartinForReal: #3391 failed to apply on top of branch "release-1.26":

Applying: fix: remove shared security rule when svc with shared-nsg annotation is deleted
Using index info to reconstruct a base tree...
M	pkg/provider/azure_loadbalancer.go
M	pkg/provider/azure_loadbalancer_test.go
M	tests/e2e/network/network_security_group.go
Falling back to patching base and 3-way merge...
Auto-merging tests/e2e/network/network_security_group.go
CONFLICT (content): Merge conflict in tests/e2e/network/network_security_group.go
Auto-merging pkg/provider/azure_loadbalancer_test.go
Auto-merging pkg/provider/azure_loadbalancer.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: remove shared security rule when svc with shared-nsg annotation is deleted
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.26

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.

@MartinForReal MartinForReal deleted the remove_shared_rule branch February 21, 2023 09:29
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. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants