Examine custom environment sources when syncing.

When comparing statefulsets, make sure EnvFrom fields are compared
as well.
This commit is contained in:
Oleksii Kliukin 2017-11-09 16:41:34 +01:00 committed by Oleksii Kliukin
parent e8d9c75949
commit 55dc12e512
1 changed files with 4 additions and 0 deletions

View File

@ -375,6 +375,10 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp
needsRollUpdate = true needsRollUpdate = true
reasons = append(reasons, "new statefulset's container environment doesn't match the current one") reasons = append(reasons, "new statefulset's container environment doesn't match the current one")
} }
if !reflect.DeepEqual(container1.EnvFrom, container2.EnvFrom) {
needsRollUpdate = true
reasons = append(reasons, "new statefulset's container environment sources doesn't match the current one")
}
if needsRollUpdate || needsReplace { if needsRollUpdate || needsReplace {
match = false match = false