-
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
template cannot fill in "current" namespace for binding cluster resources to namespace-scoped #8971
Comments
question for @bparees that I think he's answered a few times. |
Right, there's no way to do this today, template parameters don't have any way to pick up values from the system, they can only do generic substitution. And there's no way to leverage the downward api except when defining env variables. I think we have at least one other issue open requesting this capability, but since i don't want to try to track it down, i'll leave this one open too :) |
* Generate qdirstat report every night using a modified version of the script referenced by https://superuser.com/a/1028907/48763 (freeware / public domain) * Run the script in a slightly modified version of the "perl" stock Docker image * Plumb down all the Kubernetes / OpenShift objects to build the image, host the script (from a ConfigMap), and run it (as a k8s CronJob) * Jury-rigged Makefile to work around openshift/origin#8971 and share the YAML between test and production
* Generate qdirstat report every night using a modified version of the script referenced by https://superuser.com/a/1028907/48763 (freeware / public domain) * Run the script in a slightly modified version of the "perl" stock Docker image * Plumb down all the Kubernetes / OpenShift objects to build the image, host the script (from a ConfigMap), and run it (as a k8s CronJob) * Jury-rigged Makefile to work around openshift/origin#8971 and share the YAML between test and production
The desire is to create service accounts in a namespace (not known a priori) with the roles already bound, to prevent having to instruct users in how to add them afterward.
This works fine for a RoleBinding as it is already a namespace-scoped object and the client creates it within the scope of a project and the subject of the binding can be inferred. It doesn't work for adding a ClusterRoleBinding as that has no namespace scope; the namespace has to be specified in the definition, which leaves the template in the awkward position of filling in the intended namespace via a parameter.
Version
$ oc version
oc v1.3.0-alpha.0-619-g2dde6d7-dirty
kubernetes v1.3.0-alpha.1-331-g0522e63
Steps To Reproduce
Attempt to create from the following template:
Current Result
The RoleBinding is created but there is an error on the ClusterRoleBinding.
Expected Result
There is a way for the "current" project to be filled in on the service account subject, other than having to specify it explicitly with a template parameter
PROJECT=foo
or similar.The text was updated successfully, but these errors were encountered: