List of steps to reproduce (step by step, including full links if applicable):
- Create a k8s clusters in cloud vps that is maintained by https://github.com/wikimedia/labs-tools-maintain-kubeusers (such as PAWS)
- Wait for certificates to be rotated
- Try to use kubectl, get an error similar to error: error loading config file "/home/USERNAME/.kube/config": error converting *[]NamedCluster into *map[string]*api.Cluster: duplicate name "CONTEXT_NAME" in list SOME_DETAILS_AND_A_LOT_OF_NUMBERS
What happens?:
- @Majavah noticed this is likely due to https://github.com/wikimedia/labs-tools-maintain-kubeusers/blob/a6f378dd9dbb53a6e500900cda104712a33eec74/maintain_kubeusers/user.py#L226 checking only for contexts named 'toolforge' and using append instead of merge.
What should have happened instead?:
No errors.