-
- Downloads
Improve the pod moving behavior during the Kubernetes cluster upgrade. (#281)
* Improve the pod moving behavior during the Kubernetes cluster upgrade. Fix an issue of not waiting for at least one replica to become ready (if the Statefulset indicates there are replicas) when moving the master pod off the decomissioned node. Resolves the first part of #279. Small fixes to error messages. * Eliminate a race condition during the swithover. When the operator initiates the failover (switchover) that fails and then retries it for a second time it may happen that the previous waitForPodChannel is still active. As a result, the operator subscribes to the former master pod two times, causing a panic. The problem was that the original code didn't bother to cancel the waitForPodLalbel for the new master pod in the case when the failover fails. This commit fixes it by adding a stop channel to that function. Code review by @zerg-junior
Showing
- pkg/cluster/cluster.go 5 additions, 3 deletionspkg/cluster/cluster.go
- pkg/cluster/cluster_test.go 2 additions, 2 deletionspkg/cluster/cluster_test.go
- pkg/cluster/k8sres.go 1 addition, 1 deletionpkg/cluster/k8sres.go
- pkg/cluster/pod.go 21 additions, 7 deletionspkg/cluster/pod.go
- pkg/cluster/util.go 42 additions, 16 deletionspkg/cluster/util.go
Loading
Please sign in to comment