-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 oc adm prune role command to replace the existing reaper #19619
Conversation
We spoke. We'll move toward |
@deads2k remind me why we are moving away from reapers / why we cannot use GC for this? This deletes bindings that reference a role correct? @openshift/sig-security |
reapers started upstream as a client-side substitute for GC, and did whole-object dependent removal. they are being replaced upstream by server-side GC.
we made use of the reaper hook to do partial update of dependent objects. GC cannot reach into referencing objects and modify them arbitrarily |
Right, but does something prevent us from setting |
A possibly reasonable improvement that could be made upstream for this. Since GC expanded for cluster scoped resources, for cluster scoped ones too. How it gets added isn't obvious and it changes how manifests are handled for cluster-admins. For users and groups it won't work. This doesn't expand our surface area and doesn't preclude future improvements, but does protect us from upstream developments. |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k 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 |
/assign @soltysh We'll want this to provide a transition for people using delete on these resources. Check the release not and find the write spot to update in the docs. |
@deads2k the idea is legit, but I'd really see the new pruners follow the patterns from the old ones, rather than using the reapers one. I'm worried that this might lead to others copying the wrong approach. Can be done as a followup, I can pick it up if you want me to. |
I don't understand what you mean. I don't think we'll end up with more of these, hence the non-generic name. The CLI contract is backwards from a "normal" pruner. |
/retest |
Spoke on a voice call. A refactor can wait until after the 1.11 rebase to avoid extra constraints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup to what David said above.
/lgtm
/lgtm |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
oc adm prune role
accepts input likeoc delete
does, but does not remove the role itself. It removes the bindings.If we follow this pattern, I would anticipate doing the same for future ones like
oc adm prune user
.I think I prefer something like
oc reap <resource string>
. It works better with the "normal" command flow of doing generic things and it makes for an easy transition since you justoc reap <whatever flags>
, thenoc delete <whatever flags>
.@liggitt You asked for it this way. How about
oc reap
instead?