berops / claudie

Cloud-agnostic managed Kubernetes
https://docs.claudie.io/
Apache License 2.0
600 stars 41 forks source link

Bug: Node deletion in Kuber fails #1518

Closed Despire closed 3 weeks ago

Despire commented 1 month ago

Current Behaviour

The algorithm used for node deletion depend on the ordering of the control nodepools to be at the beginning. https://github.com/berops/claudie/blob/844eb7afe50aaa8241e27b47a234875a1ee9fb24/services/kuber/server/domain/utils/nodes/delete.go#L253-L277

If the control nodepool is at the end the algorithm returns the wrong node and therefore the whole deletion fails.

Expected Behaviour

Select nodes not based on the order but rather on the type of the nodes, i.e. Master.

Steps To Reproduce

  1. Build a cluster with a Loadbalancer
  2. Performer a rolling update by changing the templates
  3. See the deletion of the control plane nodes fail in kuber.