-
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
Environment variable to control exported user #8017
Comments
I like the idea of having Once we decide on exactly how it should be implemented (env var, cli flag, etc.) I think this would be a good beginner issue if anyone would like to take it on. The majority of the changes will be in these two files: https://github.com/kubernetes/kops/blob/master/cmd/kops/export_kubecfg.go Kops names the cluster, context, and user after the cluster name. In our case we overwrite the user of the same name, so kops just clobbers our user definition. but it sounds like you create an additional user and want the context's user to not be reverted. If we can come up with a flexible way of implementing this that could handle both of these scenarios that would be great. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale I think this is still a valid feature request |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale This is an issue for us as well. @rifelpet maybe something to bring up in office hours? |
Our wrapper around kops adds a flag that strips the admin credentials, replacing them with the configuration to invoke our authentication hook. I think it would be better to only include the admin credentials when given an explicit flag requesting such. I'm not quite sure how to get the information to configure a presumably site-specific authentication hook. |
#9280 illustrates what I'd like to see. I just hacked it in now, and didn't bother with tests. But you get the idea.
I am not sure how your authentication hook works, but ours work by using |
It would be great to have an environment variable to be able to configure the user kops exports.
We have RBAC setup with Google OIDC for auditing purposes and when we run commands like
kops replace
orkops export kubecfg
, it overwrites the current kube config context with the default certificate based admin user. Then any commands we run with kubectl show up as the admin user rather than the individual users.In this case, it would be great to have kops not add the admin user to the kubecfg file and just use the value from the environment variable in the context block. The environment variable could be something like
KOPS_KUBECFG_USER
The text was updated successfully, but these errors were encountered: