Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Add namespace claim to config #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

paulczar
Copy link
Contributor

This allows you to set a JWT claim to use for the namespace field to be filled
out in the kubeconfig. Useful if you give each user their own namespace. If left
out, will be left blank in kubeconfig and thus default namespace.

Signed-off-by: Paul Czarkowski username.taken@gmail.com

This allows you to set a JWT claim to use for the namespace field to be filled
out in the kubeconfig. Useful if you give each user their own namespace.  If left
out, will be left blank in kubeconfig and thus default namespace.

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
--auth-provider-arg=client-secret={{ .ClientSecret }} \
--auth-provider-arg=refresh-token={{ .RefreshToken }} \
--auth-provider-arg=id-token={{ .IDToken }}
kubectl config set-context {{ .ClusterName }} --cluster={{ .ClusterName }} --user={{ .Email }} --namespace={{ .Namespace }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If namespace claim is not set, wouldn't this give you an invalid config? Or does kubectl ignore if the value is empty?

@jenting
Copy link
Contributor

jenting commented Mar 10, 2020

ref #104

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

Successfully merging this pull request may close these issues.

3 participants