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

NetLB controller: cleanup RBS resources in case service type changed #1881

Merged

Conversation

cezarygerard
Copy link
Contributor

NetLB RBS Controller: Change needsDeletion and shouldProcessService logic

  1. only process if old or new version of the service was/is RBS
  2. only delete if service has RBS annotation/finalizer/forwarding rule, even if the type changed from LoadBalacer to other type

This will make controller cleanup RBS resources in case service type changed.

This PR builds on top of pull/1879 from @panslava

panslava and others added 2 commits December 6, 2022 15:16
This fixes issue, that on switching Service Type from LoadBalancer to
ClusterIP or NodePort RBS resources were not cleaned up
…ogic

1) only process if old or new version of the service was/is RBS
2) only delete if service has RBS annotation/finalizer/forwarding rule, even if the type changed from LoadBalacer to other
3) added 2 test cases for service type change (external name, empty value)
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 9, 2022
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2022
@cezarygerard
Copy link
Contributor Author

/assign @panslava
/assign @aojea

@cezarygerard cezarygerard changed the title Cgz fix service type change NetLB controller: cleanup RBS resources in case service type changed. Dec 9, 2022
@cezarygerard cezarygerard changed the title NetLB controller: cleanup RBS resources in case service type changed. NetLB controller: cleanup RBS resources in case service type changed Dec 9, 2022
@panslava
Copy link
Contributor

Good job in saving up on calls!

/lgtm
/hold

unhold when you think we are ready to merge

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Dec 12, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cezarygerard, panslava

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 [cezarygerard,panslava]

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

@panslava
Copy link
Contributor

/unhold

let's merge

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2022
@k8s-ci-robot k8s-ci-robot merged commit c714233 into kubernetes:master Dec 12, 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

4 participants