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

🐛Add DeleteMachineAnnotation for MachineSet Delete Policy #2929

Merged

Conversation

wfernandes
Copy link
Contributor

What this PR does / why we need it:
This PR adds another annotation called DeleteMachineAnnotation=cluster.x-k8s.io/delete-machine to the MachineSet Delete Policy because that annotation is the one that is documented.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2912

Release Notes

  • ➕ Add controllers.DeleteMachineAnnotation with value cluster.x-k8s.io/delete-machine. Please use this annotation moving forward as the other annotation DeleteNodeAnnotation is planned for removal in the next CAPI release.

@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 Apr 16, 2020
@k8s-ci-robot k8s-ci-robot requested review from detiber and ncdc April 16, 2020 22:48
@vincepri
Copy link
Member

Code changes look good, deprecation warning should be there as @benmoss suggested

/milestone v0.3.4

@k8s-ci-robot k8s-ci-robot added this to the v0.3.4 milestone Apr 17, 2020
@fabriziopandini
Copy link
Member

LGTM for me as well.
Thanks @wfernandes!

@ncdc
Copy link
Contributor

ncdc commented Apr 17, 2020

While we're in here - the code currently requires a non-empty string for the annotation's value. Should we change to a presence check?

@detiber
Copy link
Member

detiber commented Apr 17, 2020

While we're in here - the code currently requires a non-empty string for the annotation's value. Should we change to a presence check?

+1 from me

@wfernandes
Copy link
Contributor Author

While we're in here - the code currently requires a non-empty string for the annotation's value. Should we change to a presence check?

Thanks for bringing this up. I thought that was weird too and wanted to bring that up. I'll fix it to make it a presence check instead.

@wfernandes wfernandes force-pushed the fix-delete-annotation branch from 9645a74 to ffb2640 Compare April 17, 2020 18:39
@wfernandes wfernandes force-pushed the fix-delete-annotation branch from ffb2640 to 32a4862 Compare April 17, 2020 18:39
@vincepri
Copy link
Member

Changes LGTM

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri, wfernandes

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 Apr 20, 2020
@wfernandes
Copy link
Contributor Author

@vincepri Do we have an issue created to remove DeleteNodeAnnotation? If not, should we create one and mark it for the Next milestone?
Asking because I'm not sure how we track things that are marked for deprecation.

@vincepri
Copy link
Member

Yes please, we can put it in v0.4

@detiber
Copy link
Member

detiber commented Apr 21, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 548482e into kubernetes-sigs:master Apr 21, 2020
@wfernandes wfernandes deleted the fix-delete-annotation branch April 21, 2020 22:34
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.

MachineSet is looking at the wrong annotation for Machine deletion
7 participants