Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

HNC: consider simplifying the inheritance of allowCascadingDelete #730

Closed
adrianludwin opened this issue May 15, 2020 · 5 comments · Fixed by #787
Closed

HNC: consider simplifying the inheritance of allowCascadingDelete #730

adrianludwin opened this issue May 15, 2020 · 5 comments · Fixed by #787
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Milestone

Comments

@adrianludwin
Copy link
Contributor

Right now, allowCascadingDelete is only inherited up through subnamespaces to the first full namespace. This is probably the "right" thing to do but it's kind of hard to explain. It might be simpler to just accept it if any ancestor has it, which is actually what we say in the user guide right now (the real definition is just shown in a "note" block).

/assign @yiqigao217

Yiqi, wdyt?

/good-first-issue

@k8s-ci-robot
Copy link
Contributor

@adrianludwin:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

Right now, allowCascadingDelete is only inherited up through subnamespaces to the first full namespace. This is probably the "right" thing to do but it's kind of hard to explain. It might be simpler to just accept it if any ancestor has it, which is actually what we say in the user guide right now (the real definition is just shown in a "note" block).

/assign @yiqigao217

Yiqi, wdyt?

/good-first-issue

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.

@k8s-ci-robot k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 15, 2020
@adrianludwin adrianludwin added this to the hnc-backlog milestone May 15, 2020
@yiqigao217
Copy link
Contributor

My concern is that users may set it for a one-time deletion and forget to unset it. To support this simplified inheritance, we may need to come up with a new mechanism to prevent that case? WDYT @adrianludwin

@adrianludwin
Copy link
Contributor Author

adrianludwin commented May 15, 2020 via email

@adrianludwin adrianludwin modified the milestones: hnc-backlog, hnc-v0.5 Jun 1, 2020
@rcolline
Copy link

rcolline commented Jun 4, 2020

What is the usecase justifying cascading deletes? Do we expect users to often want to delete subtrees? I feel like namespace trees will not be something that have short lifecycle, this is not a filesystem.

I guess I am questioning the overall product motivation for such a feature. The downsides is that it creates a SPOF with a large blast radius.

@yiqigao217
Copy link
Contributor

yiqigao217 commented Jun 4, 2020

Hi @rcolline , this is a great question. Cascading delete only applies to subnamespaces that are created by HNC from subnamespaceAnchor CRs in parent (regular) namespaces for users without cluster-level privileges to create namespaces. Regular namespaces will never be cascading deleted.

Subnamespaces are created/deleted by creating/deleting the anchor CR in the parent. Therefore, cascading delete would happen on subnamespace chains. That's also why we have allowCascadingDelete to prevent the deletion by accident or not being aware of existing subnamespaces.

Please let me know if it doesn't answer your question or if you were asking why we need cascading delete on subnamespaces.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants