Skip to content

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Feb 11, 2021

Add logic to remove the operator's finalizer on LoadBalancer services, which is no longer needed to clean up DNS records since the DNSRecord CRD was added.

  • pkg/operator/controller/ingress/load_balancer_service.go (ensureLoadBalancerService): Use the new deleteLoadBalancerService method to delete the service as needed. Use the new deleteLoadBalancerServiceFinalizer method to delete any finalizer on any existing service in the delete and update cases.
    (desiredLoadBalancerService): Delete logic to add a finalizer to the service.
    (deleteLoadBalancerServiceFinalizer): New method. Delete any finalizer from the service.
    (finalizeLoadBalancerService): Refactor to use the new deleteLoadBalancerServiceFinalizer method.
    (deleteLoadBalancerService): New method.

For reference, this PR incorporates changes from #472, which was reverted in #514.

@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Bugzilla bug 1914127, which is invalid:

  • expected the bug to target the "4.8.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

Bug 1914127: Delete the ingress.openshift.io/operator finalizer

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 11, 2021
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 11, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Feb 11, 2021

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Bugzilla bug 1914127, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Feb 11, 2021
Add logic to remove the operator's finalizer on LoadBalancer services,
which is no longer needed to clean up DNS records since the DNSRecord CRD
was added.

This commit fixes bug 1914127.

https://bugzilla.redhat.com/show_bug.cgi?id=1914127

* pkg/operator/controller/ingress/load_balancer_service.go
(ensureLoadBalancerService): Use the new deleteLoadBalancerService method
to delete the service as needed.  Use the new
deleteLoadBalancerServiceFinalizer method to delete any finalizer on any
existing service in the delete and update cases.
(desiredLoadBalancerService): Delete logic to add a finalizer to the
service.
(deleteLoadBalancerServiceFinalizer): New method.  Delete any finalizer
from the service.
(finalizeLoadBalancerService): Refactor to use the new
deleteLoadBalancerServiceFinalizer method.
(deleteLoadBalancerService): New method.
@Miciah Miciah force-pushed the BZ1914127-delete-the-ingress-dot-openshift-dot-io-slash-operator-finalizer branch from 6dab9e7 to 081081a Compare February 11, 2021 04:22
Copy link
Contributor

@sgreene570 sgreene570 left a comment

Choose a reason for hiding this comment

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

Overall LGTM, I just have one small question.


// deleteLoadBalancerService deletes a load balancer service.
func (r *reconciler) deleteLoadBalancerService(service *corev1.Service, options *crclient.DeleteOptions) error {
if err := r.client.Delete(context.TODO(), service, options); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a foreseeable reason to include an *crclient.DeleteOptions parameter? I'm not opposed to adding one here, but I recognize that the other r.client.Delete calls in this repo exclude this paramter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, and I had to go back to see why I did this. Yes, we will want to specify PropagationPolicy: "Foreground" when deleting and recreating the service if/when we re-introduce mutable scope.

Copy link
Contributor

Choose a reason for hiding this comment

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

aha! That makes sense. Looking forward to taking advantage of that 😉

@sgreene570
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah, sgreene570

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2021
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit aa5d96d into openshift:master Feb 16, 2021
@openshift-ci-robot
Copy link
Contributor

@Miciah: All pull requests linked via external trackers have merged:

Bugzilla bug 1914127 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1914127: Delete the ingress.openshift.io/operator finalizer

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 16, 2021

@Miciah: Bugzilla bug 1914127 is in an unrecognized state (VERIFIED) and will not be moved to the MODIFIED state.

Details

In response to this:

Bug 1914127: Delete the ingress.openshift.io/operator finalizer

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants