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

Remove obsolete finalizer from KnativeServing resources. #35

Merged

Conversation

markusthoemmes
Copy link
Contributor

Proposed Changes

The genreconciler machinery adds a finalizer automatically. There's no need to define our own and do our own management of it. We need to make sure to remove it from old resources though.

Release Note

NONE

/assign @houshengbo @jcrossley3

The genreconciler machinery adds a finalizer automatically. There's no need to define our own and do our own management of it. We need to make sure to remove it from old resources though.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 27, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 27, 2020
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@markusthoemmes: 0 warnings.

In response to this:

Proposed Changes

The genreconciler machinery adds a finalizer automatically. There's no need to define our own and do our own management of it. We need to make sure to remove it from old resources though.

Release Note

NONE

/assign @houshengbo @jcrossley3

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.

if finalizer == finalizerName {
return nil
}
func (r *Reconciler) ensureFinalizerRemoval(_ context.Context, _ *mf.Manifest, instance *servingv1alpha1.KnativeServing) error {
Copy link
Contributor

@houshengbo houshengbo Apr 27, 2020

Choose a reason for hiding this comment

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

If I understand correctly, the comment of this function should be changed into

ensureFinalizerRemovel ensures that Finalizers in the operator Serving CR is consistent with the ones generated by genreconciler.

The oldFinalizerName = "delete-knative-serving-manifest" is removed, if it exists in old operator serving CR.

In the delete function, we do not even check the Finalizers any more.

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 catch, changed the comment.

@houshengbo
Copy link
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 27, 2020
@houshengbo
Copy link
Contributor

/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo, markusthoemmes

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 27, 2020
@knative-prow-robot knative-prow-robot merged commit addba86 into knative:master Apr 27, 2020
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. cla: yes Indicates the PR's author has signed the CLA. lgtm 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.

5 participants