Update GC cross-namespace note#25091
Conversation
|
Deploy preview for kubernetes-io-vnext-staging processing. Building with commit 8d96fcb https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5fb52c3c088a620007596158 |
|
oops, pushed branch cut from |
| it is treated as having an unresolveable owner reference, and is not able to be garbage collected. | ||
|
|
||
| In v1.20+, if the garbage collector detects an invalid cross-namespace | ||
| or cluster-scoped -> namespaced `ownerReference`, it reports a warning Event |
There was a problem hiding this comment.
nit: or cluster-scoped dependent referencing a namespaced ownerr or whatever is better than using the arrow ?
sftim
left a comment
There was a problem hiding this comment.
Hi, 3 tweaks I suggest - but don't let these block other reviewers from moving this PR forward. This will need a tech review.
|
comments addressed. |
|
I don't see an earlier technical LGTM, so I'm going to leave this pending that. |
|
nit: Generally i like to see a reason mentioned on why cross namespaces references should not be allowed , is it a performance issue or a security issue or something else. Might be good to put a one liner here or that is too much for the documentation, not sure. /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 7a7519955d5a73d68be69cc292071f640c060d69 |
|
This matches the PR and our intended behavior. /lgtm
This goes back to the original design that keeps the GC design aligned to using namespaces as an ACL boundary. If we allow cross-namespace references, then it becomes possible for actions in one namespace to have impact in another. Several years ago, we were not ready to allow that interaction and today our position remains about the same. It's open for careful consideration, but we won't change the API to support it (requires a change to objectmeta) just because we could. |
|
/remove-language ja vi fr |
|
/remove-language es id zh |
|
/milestone 1.20 |
|
@kbhawkey: You must be a member of the kubernetes/website-milestone-maintainers GitHub team to set the milestone. If you believe you should be able to issue the /milestone command, please contact your Website milestone maintainers and have them propose you as an additional delegate for this responsibility. DetailsIn response to this:
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. |
| and owners that are cluster-scoped. | ||
| 2) Cluster-scoped dependents can only specify cluster-scoped owners, but not | ||
| namespace-scoped owners. | ||
| Cross-namespace owner references are disallowed by design. |
There was a problem hiding this comment.
nit: What is an "owner reference"? I am guessing the same as ownerReference?
There was a problem hiding this comment.
ownerReferences are described in the paragraphs above
There was a problem hiding this comment.
OK. It may help to break down the two cases (if I understand correctly). Does line 64 apply to the following paragraph or both pargraphs?
Is this true:
Dependent objects are only owned (referenced) by objects within their namespace or cluster scope.
There are two types of scoping that affect object ownership and garbage collection:
- Namespaced
Namespaced owners must exist in the same namespace as the dependent.
... - Cluster-scoped
Cluster-scoped dependents can only specify cluster-scoped owners.
...
There was a problem hiding this comment.
Hi @liggitt after this comment is addressed, I think this would be good to merge. PTAL
There was a problem hiding this comment.
Hi. I think the text is okay to merge. In the future, the content could be updated -- make the text easier to digest and localize.
/lgtm
sorry i meant, is this something we should also document here ? I think from your and Jordan's answer, it has become clear and it makes sense to not allow, and putting that in the documentation will help our users. |
|
/cc @annajung |
|
/milestone 1.20 |
|
/assign |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update note about cross-namespace references for garbage collection
xref kubernetes/kubernetes#92743
/cc @deads2k @jpbetz