Page MenuHomePhabricator

Maintain kubeusers duplicates context and certificate entries in kubeconfig if the context is not named toolforge
Closed, ResolvedPublicBUG REPORT

Description

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?:

What should have happened instead?:
No errors.

Event Timeline

Change 795481 had a related patch set uploaded (by Majavah; author: Majavah):

[labs/tools/maintain-kubeusers@master] user: fix renewals on paws / toolsbeta

https://gerrit.wikimedia.org/r/795481

Change 795481 merged by jenkins-bot:

[labs/tools/maintain-kubeusers@master] user: fix renewals on paws / toolsbeta

https://gerrit.wikimedia.org/r/795481

taavi claimed this task.

Fixed so maintain-kubeusers won't generate any new broken configs.