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 blog post: Using Finalizers to Control Deletion #26997

Conversation

aaron-kasten
Copy link
Contributor

Add block post describing operation of finalizers and owner references via kubectl delete

This blog post contains the content of a presentation given at KubeCon, in blog form.

Submission to kubenetes.io recommended by CNCF.

@k8s-ci-robot
Copy link
Contributor

Welcome @aaron-kasten!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 10, 2021
@k8s-ci-robot k8s-ci-robot requested review from onlydole and sftim March 10, 2021 19:11
@k8s-ci-robot k8s-ci-robot added area/blog Issues or PRs related to the Kubernetes Blog subproject language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Mar 10, 2021
@netlify
Copy link

netlify bot commented Mar 10, 2021

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 07068ce

https://deploy-preview-26997--kubernetes-io-master-staging.netlify.app

@aaron-kasten
Copy link
Contributor Author

aaron-kasten commented Mar 11, 2021

@onlydole @sftim email address on git commit is that of our corporate CLA (aaron@kasten.io for a CLA for kasten.io).

I'm not sure what's missing from the PR to get the CLA detection working correctly.

edit: PS. Never mind! Looks like CLA woke up and found it.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 11, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Hi. “Finaliers” is misspelled, it should be Finalizers.

I've added some other feedback.

Would you be interested in turning this page into a task? For example, “Use finalizers to control deletion” could be an appropriate title.

@aaron-kasten aaron-kasten force-pushed the deletes-finaliers-and-owner-references branch from 5c58f32 to d8331bb Compare March 11, 2021 16:47
@aaron-kasten
Copy link
Contributor Author

aaron-kasten commented Mar 11, 2021

@sftim thank you for the feedback! I integrated the changes - hopefully an improvement.

I went with "Using finalizers to control deletion" opposed to "Use finalizers to control deletion" - will switch to "use" if you think its a better choice.

@aaron-kasten aaron-kasten requested a review from sftim March 11, 2021 16:50
@aaron-kasten
Copy link
Contributor Author

@sftim what is the next step for approval? Are there any actions I need to take on this?

sftim
sftim previously requested changes Mar 18, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

A couple more fixes needed I think. Also, would you be willing to squash the commits in this article @aaron-kasten

(if you're not sure but you're happy to have the changes combined, we can do that squashing for you).

@aaron-kasten aaron-kasten force-pushed the deletes-finaliers-and-owner-references branch from 2b17605 to ddbde0a Compare March 19, 2021 16:42
@aaron-kasten aaron-kasten requested a review from sftim March 19, 2021 16:43
@aaron-kasten
Copy link
Contributor Author

@sftim:

  • fixed image references (I'll know better for checking image references next time).
  • shrunk images a little
  • squashed local branch (appears in PR as one commit)
  • merged your changes for Youtube link prologue (now gone)

I think that's it... tell me if there's anything else.

@aaron-kasten
Copy link
Contributor Author

@sftim how does this PR look. Is it ready for merge?

@sftim
Copy link
Contributor

sftim commented Mar 31, 2021

/retitle Add blog post: Using Finalizers to Control Deletion

@k8s-ci-robot k8s-ci-robot changed the title add blog post Add blog post: Using Finalizers to Control Deletion Mar 31, 2021
@sftim sftim dismissed their stale review March 31, 2021 00:19

Review was stale

@sftim
Copy link
Contributor

sftim commented Mar 31, 2021

Preview: Using Finalizers to Control Deletion

@sftim
Copy link
Contributor

sftim commented Mar 31, 2021

We'll follow the review process or something roughly like it. At the moment the blog team is a little short on volunteers I'm afraid.

@aaron-kasten
Copy link
Contributor Author

@sftim I understand. Tell me if there's anything I can do to help it along.

@nate-double-u
Copy link
Contributor

curl -X DELETE \
  http://localhost:8080/api/v1/namespaces/default/configmaps/mymap-parent \
  -d '{ "kind":"DeleteOptions", "apiVersion":"v1", "propagationPolicy":"Background" }' \
  -H "Content-Type: application/json"

ought to work fine

Confirmed, this works. Thanks!

@aaron-kasten
Copy link
Contributor Author

```shell
curl -X DELETE \
  http://localhost:8080/api/v1/namespaces/default/configmaps/mymap-parent \
  -d '{ "kind":"DeleteOptions", "apiVersion":"v1", "propagationPolicy":"Background" }' \
  -H "Content-Type: application/json"

ought to work fine

Confirmed, this works. Thanks!

@nate-double-u is there action I should take on this? This sounds like a layout issue?

@nate-double-u
Copy link
Contributor

nate-double-u commented Apr 29, 2021

@nate-double-u is there action I should take on this? This sounds like a layout issue?

I think that if folks are copying and pasting snippets from the article, then @sftim's layout works better (though it may be less readable as several bits of info are put onto the same line).

I think I'd err on the side of things working for the most readers when copied from the article, so I'd suggest updating the layout. That said, this may be an issue with my setup (using zsh instead of bash), so I'd defer the decision to you and others who might have an opinion (does it work as is for other users?)

@aaron-kasten
Copy link
Contributor Author

@nate-double-u is there action I should take on this? This sounds like a layout issue?

I think that if folks are copying and pasting snippets from the article, then @sftim's layout works better (though it may be less readable as several bits of info are put onto the same line).

I think I'd err on the side of things working for the most readers when copied from the article, so I'd suggest updating the layout. That said, this may be an issue with my setup (using zsh instead of bash), so I'd defer the decision to you and others who might have an opinion (does it work as is for other users?)

@nate-double-u agreed - I think a least-common-denominator approach is best, which is represented by keeping everything on one line. The JSON is not so large that it makes the example confusing.

@aaron-kasten aaron-kasten requested a review from sftim April 29, 2021 18:47
@aaron-kasten
Copy link
Contributor Author

@sftim @nate-double-u changes are in ... all set.

@nate-double-u
Copy link
Contributor

new date deploy preview: Using Finalizers to Control Deletion

Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

I'm still not sure how to get k8s into a state described in the Forcing a Deletion of a Namespace section, but when I create a new test namespace (kubectl create namespace test) first, the snippet doesn't throw the BadRequest error.

Thanks for this @aaron-kasten, it's an interesting article!

LGTM

@aaron-kasten
Copy link
Contributor Author

@sftim @kbhawkey unsure of what the next steps are. The PR still needs a lgtm from a reviewer.

@aaron-kasten aaron-kasten requested a review from nate-double-u May 6, 2021 20:01
@aaron-kasten
Copy link
Contributor Author

@sftim is this ready?

@sftim
Copy link
Contributor

sftim commented May 10, 2021

I've set a publication date for Friday
/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label May 10, 2021
@sftim
Copy link
Contributor

sftim commented May 10, 2021

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 10, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d4fcbe65e10c806becb957553bcf3ef270fb73a6

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rolfedh, sftim

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 May 10, 2021
@k8s-ci-robot k8s-ci-robot merged commit 134054f into kubernetes:master May 10, 2021
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. area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants