do not block rolling updates with lazy spilo update enabled (#1012)
* do not block rolling updates with lazy spilo update enabled * treat initContainers like Spilo image Co-authored-by: Felix Kunde <felix.kunde@zalando.de>
This commit is contained in:
parent
fe7ffaa112
commit
fa6929f028
|
|
@ -76,7 +76,7 @@ Those are top-level keys, containing both leaf keys and groups.
|
||||||
The default is `true`.
|
The default is `true`.
|
||||||
|
|
||||||
* **enable_lazy_spilo_upgrade**
|
* **enable_lazy_spilo_upgrade**
|
||||||
Instruct operator to update only the statefulsets with the new image without immediately doing the rolling update. The assumption is pods will be re-started later with the new image, for example due to the node rotation.
|
Instruct operator to update only the statefulsets with new images (Spilo and InitContainers) without immediately doing the rolling update. The assumption is pods will be re-started later with new images, for example due to the node rotation.
|
||||||
The default is `false`.
|
The default is `false`.
|
||||||
|
|
||||||
* **etcd_host**
|
* **etcd_host**
|
||||||
|
|
|
||||||
|
|
@ -488,7 +488,6 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compa
|
||||||
// until they are re-created for other reasons, for example node rotation
|
// until they are re-created for other reasons, for example node rotation
|
||||||
if c.OpConfig.EnableLazySpiloUpgrade && !reflect.DeepEqual(c.Statefulset.Spec.Template.Spec.Containers[0].Image, statefulSet.Spec.Template.Spec.Containers[0].Image) {
|
if c.OpConfig.EnableLazySpiloUpgrade && !reflect.DeepEqual(c.Statefulset.Spec.Template.Spec.Containers[0].Image, statefulSet.Spec.Template.Spec.Containers[0].Image) {
|
||||||
needsReplace = true
|
needsReplace = true
|
||||||
needsRollUpdate = false
|
|
||||||
reasons = append(reasons, "lazy Spilo update: new statefulset's pod image doesn't match the current one")
|
reasons = append(reasons, "lazy Spilo update: new statefulset's pod image doesn't match the current one")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue