Incorrect cached token fetched with multiple kubeconfigs · Issue #592 · kubernetes-client/javascript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
When using multiple kubeconfig files with the same user.name
field, the kubeconfig user that is fetched first for execAuth
will be used for all subsequent users that match the same name.
The issue arises here.
https://github.com/kubernetes-client/javascript/blob/master/src/exec_auth.ts#L74
I'm not sure if it's an antipattern to use multiple kubeconfigs but maybe we could document this if we don't want to fix it. Having different user names is easy enough. We could also hash the whole user object to cache instead of the name. I can implement this solution or another proposed solution if we want to address this.