Skip to content
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

Allow per user based kubelogin lock file #909

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tommylogik
Copy link

Purpose of this feature


In a multi-user environment we need to be able to simultaneously have users login to a kubernetes cluster.

Updating this method to go from using the os temp directory to using the user home directory to create the generated lock filename allows for multi-user capable login. If the user doesn't have the proper environment variable set (HOME,USERPROFILE,home), it falls back to the default temp directory.

Current workaround


The current workaround for this functionality is to temporarily set TMPDIR env variable to the users home directory and then reset it to the temp directory

For example:

$ export OLD_TMPDIR=$(echo $TMPDIR)
$ kubectl oidc-login
$ export TMPDIR=$(echo $OLD_TMPDIR)

This will work for the time being but I would love to not have to implement this workaround and have it part of the core functionality of kubelogin's master branch.

@MioOgbeni
Copy link

I would also appreciate this PR. Can you review it @int128?

@reinka
Copy link

reinka commented Jun 28, 2023

Same here :) Ping @int128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants