Skip to content

Commit 55dc12e

Browse files
committed
Examine custom environment sources when syncing.
When comparing statefulsets, make sure EnvFrom fields are compared as well.
1 parent e8d9c75 commit 55dc12e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cluster/cluster.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp
375375
needsRollUpdate = true
376376
reasons = append(reasons, "new statefulset's container environment doesn't match the current one")
377377
}
378+
if !reflect.DeepEqual(container1.EnvFrom, container2.EnvFrom) {
379+
needsRollUpdate = true
380+
reasons = append(reasons, "new statefulset's container environment sources doesn't match the current one")
381+
}
378382

379383
if needsRollUpdate || needsReplace {
380384
match = false

0 commit comments

Comments
 (0)