Skip to content

Commit b4ad545

Browse files
committed
Switch MergeEnvArray argument order for priority
1 parent a39ab51 commit b4ad545

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/system/phase2_creating.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,11 @@ func (r *Reconciler) setDesiredCoreEnv(c *corev1.Container) {
479479
}
480480

481481
if r.NooBaa.Spec.EnvVariablesOverride != nil && r.NooBaa.Spec.EnvVariablesOverride.Core != nil {
482-
util.MergeEnvArrays(&c.Env, &r.NooBaa.Spec.EnvVariablesOverride.Core);
482+
// util.MergeEnvArrays will keep variables of the first array provided in
483+
// arguments in case of a conflict, so we provide the override array first
484+
// and then set the container Env array to the resulting merged array
485+
util.MergeEnvArrays(&r.NooBaa.Spec.EnvVariablesOverride.Core, &c.Env);
486+
c.Env = r.NooBaa.Spec.EnvVariablesOverride.Core;
483487
}
484488
}
485489

0 commit comments

Comments
 (0)