kubernetes-sigs/cluster-api

controlplane init mutex configmap not properly reparented after backup/restore

Open

#7,794 opened on Dec 21, 2022

View on GitHub
 (24 comments) (0 reactions) (0 assignees)Go (1,532 forks)auto 404
help wantedkind/bugpriority/important-longtermtriage/accepted

Repository metrics

Stars
 (4,267 stars)
PR merge metrics
 (PR metrics pending)

Description

What steps did you take and what happened: (a) velero-backup a namespace w/ CAPI-managed clusters/resources (b) delete the namespace (c) velero-restore the namespace w/ the CAPI-managed clusters/resources (d) observe that the configmap mutex is not properly adopted by the newly restored Cluster object

What did you expect to happen: proper adoption of the configmap by the Cluster so that subsequent "uninstallation" of the Cluster results in proper GC of the mutex configmap

Anything else you would like to add: a bunch of other adoption issues were fixed recently, looks like this was an oversight

see pkg bootstrap/kubeadm/internal/locking, the setMetadata func sets initial ownership, but thereafter ownership lingers unchanged, indefinitely

Environment:

  • Cluster-api version: 1.2.7
  • minikube/kind version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):

/kind bug [One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels]

Contributor guide