-
Notifications
You must be signed in to change notification settings - Fork 39k
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
make gc admission set attribute namespace correctly for owners #70389
make gc admission set attribute namespace correctly for owners #70389
Conversation
/lgtm |
/lgtm |
@deads2k can you approve? Thanks. |
@@ -68,6 +68,15 @@ func (fakeAuthorizer) Authorize(a authorizer.Attributes) (authorizer.Decision, s | |||
return authorizer.DecisionAllow, "", nil | |||
} | |||
|
|||
if username == "non-node-deleter" { | |||
if a.GetVerb() == "delete" && a.GetResource() == "nodes" { | |||
return authorizer.DecisionNoOpinion, "", nil |
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.
I assume there's not other authorizers running and therefore this is the same as a reject? Would it make the test more obvious if we changed these to explicit rejections?
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.
Right. Here I'm just trying to be consistent with the existing code.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: caesarxuchao, lavalamp 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 |
Fixing #70295 (comment)
In garbage collection, the owner object can be cluster-scoped. The gc admission plugin now deals with this case.
/assign @yue9944882
/sig api-machinery
/kind bug