-
Notifications
You must be signed in to change notification settings - Fork 4.7k
RestrictUsersAdmission: allow service account with implicit namespace #13649
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
RestrictUsersAdmission: allow service account with implicit namespace #13649
Conversation
Allow role binding restrictions to match and allow a service account subject with an implicit namespace, which is inferred to be the namespace of the role binding. The use-case for this change is that an application template should be able to specify a role binding with a service account as the subject, without hard-coding the namespace in the template or requiring the user to specify the namespace as a parameter. In this scenario, the subject's namespace gets defaulted to the role binding's namespace, but only after the admission control plug-in executes; the subject that the plug-in sees is a service account with no namespace specified, so RestrictUsersAdmission should infer the namespace to be that the one which will be defaulted later.
Evaluated for origin test up to 8d8b3e4 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/593/) (Base Commit: 83e3250) |
1 similar comment
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/593/) (Base Commit: 83e3250) |
@liggitt, could you review this? |
lgtm [merge] |
Flake #13662:
https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_integration/884/consoleFull Failure during provisioning:
|
The second failure could be #13470, although there it's "Request failed: <urlopen error [Errno -2] Name or service not known>" whereas here it's "An unknown error occurred: ''". |
re[merge] -- queue is healthy again |
@openshift-bot, the last build failed from the following flakes:
re[merge] |
Evaluated for origin merge up to 8d8b3e4 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/291/) (Base Commit: dbcd81b) (Image: devenv-rhel7_6128) |
Allow role binding restrictions to match and allow a service account subject with an implicit namespace, which is inferred to be the namespace of the role binding.
The use-case for this change is that an application template should be able to specify a role binding with a service account as the subject, without hard-coding the namespace in the template or requiring the user to specify the namespace as a parameter. In this scenario, the subject's namespace gets defaulted to the role binding's namespace, but only after the admission control plug-in executes; the subject that the plug-in sees is a service account with no namespace specified, so RestrictUsersAdmission should infer the namespace to be that the one which will be defaulted later.
Related to https://bugzilla.redhat.com/show_bug.cgi?id=1439065.
openshift-bot, please [test]!
@deads2k, please review!
@abhgupta, FYI.