From 4b0c4f1fefe8e00dba18da7c3132beaffd08ba31 Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Thu, 9 Nov 2017 16:41:34 +0100 Subject: [PATCH] Examine custom environment sources when syncing. When comparing statefulsets, make sure EnvFrom fields are compared as well. --- pkg/cluster/cluster.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index e7160ff01..10b0c0eea 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -368,6 +368,10 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp needsRollUpdate = true 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 { match = false