virt-operator: on update, roll over daemonsets first, then controllers
@@ -2553,9 +2553,10 @@ func SyncAll(queue workqueue.RateLimitingInterface, kv *v1.KubeVirt, prevStrateg
if takeUpdatePath {
// UPDATE PATH IS
// 1. daemonsets - ensures all compute nodes are updated to handle new features
- // 2. controllers - ensures controll plane is ready for new features
- // 3. wait for daemonsets and controllers to roll over
- // 4. apiserver - toggles on new features.
+ // 2. wait for daemonsets to roll over
+ // 3. controllers - ensures controll plane is ready for new features
+ // 4. wait for controllers to roll over
+ // 5. apiserver - toggles on new features.
// create/update Daemonsets
for _, daemonSet := range targetStrategy.daemonSets {
@@ -2565,6 +2566,12 @@ func SyncAll(queue workqueue.RateLimitingInterface, kv *v1.KubeVirt, prevStrateg
}
}
+ // wait for daemonsets
+ if !daemonSetsRolledOver {
+ // not rolled out yet
+ return false, nil
+ }
+
// create/update Controller Deployments
for _, deployment := range controllerDeployments(targetStrategy) {
err := syncDeployment(kv, deployment, stores, clientset, expectations)
@@ -2577,8 +2584,8 @@ func SyncAll(queue workqueue.RateLimitingInterface, kv *v1.KubeVirt, prevStrateg
}
}
- // wait for daemonsets and controllers
- if !daemonSetsRolledOver || !controllerDeploymentsRolledOver {
+ // wait for controllers
+ if !controllerDeploymentsRolledOver {
// not rolled out yet
return false, nil
}
