konfig
konfig copied to clipboard
Solve merge conflicts on duplicate data
When merging two contexts which reference the same user name (though different users) the resulting kubecfg drops one of those users and the corresponding context can not authenticate.
Suggestion: Detect duplicate user names (i.e. same name but different data) and rename them on import (e.g. to $context-$user
).
That's an interesting issue. As you know, this script is based on the canonical kubectl config view
command. I'm surprised that this does not catch this corner case.
Can you open a bug in the kubernetes repo about this? I think kubectl
should catch this.