Skip to content

Commit

Permalink
Switch MergeEnvArray argument order for priority
Browse files Browse the repository at this point in the history
  • Loading branch information
NoOverflow committed Jan 18, 2025
1 parent a39ab51 commit b4ad545
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/system/phase2_creating.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,11 @@ func (r *Reconciler) setDesiredCoreEnv(c *corev1.Container) {
}

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

Expand Down

0 comments on commit b4ad545

Please sign in to comment.