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

user in kubeconfig and commandline is still email address #125

Closed
rendhalver opened this issue Apr 1, 2019 · 1 comment · Fixed by #129
Closed

user in kubeconfig and commandline is still email address #125

rendhalver opened this issue Apr 1, 2019 · 1 comment · Fixed by #129

Comments

@rendhalver
Copy link
Contributor

followup from #124

i reconfigured our test cluster so it does not set emailClaim in the configmap but the user is still my email address.

This is what the commandline output looks like:

kubectl config set-credentials user@domain.com  \
[snip]
kubectl config set-context APP-Dev --cluster=APP-Dev --user=user@domain.com

The resulting kubeconfig looks the same.

@johnharris85
Copy link
Contributor

There were some changes to address this (mainly #87 I think) but I think the problem is that if emailClaim is omitted from the config, we always fall back to setting it to email by default here so the new logic is never actually triggered. The test case misses this too because it exercises the logic but skips the creation of the defaults. I think the fix should just be to set the default e-mail value to "" in config.go. Happy to submit a PR if we think that's the right approach. WDYT @alexbrand @stevesloka ?

johnharris85 pushed a commit to johnharris85/gangway that referenced this issue May 6, 2019
Recent changes to set the kubeconfig user to `user@cluster` aren't
taking effect due to a default always being present and not triggering
the logic. This removes the default and allows the proper behavior
to work.

Closes vmware-archive#125

Signed-off-by: John Harris <joharris@vmware.com>
johnharris85 pushed a commit to johnharris85/gangway that referenced this issue May 6, 2019
Recent changes to set the kubeconfig user to `user@cluster` aren't
taking effect due to a default always being present and not triggering
the logic. This removes the default and allows the proper behavior
to work.

Closes vmware-archive#125

Signed-off-by: John Harris <joharris@vmware.com>
johnharris85 pushed a commit to johnharris85/gangway that referenced this issue May 9, 2019
Recent changes to set the kubeconfig user to `user@cluster` aren't
taking effect due to a default always being present and not triggering
the logic. This removes the default and allows the proper behavior
to work.

Closes vmware-archive#125

Signed-off-by: John Harris <joharris@vmware.com>
johnharris85 pushed a commit to johnharris85/gangway that referenced this issue May 9, 2019
Recent changes to set the kubeconfig user to `user@cluster` aren't
taking effect due to a default always being present and not triggering
the logic. This removes the default and allows the proper behavior
to work.

Closes vmware-archive#125

Signed-off-by: John Harris <joharris@vmware.com>
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 a pull request may close this issue.

2 participants