Skip to content

Commit 795e3b5

Browse files
authored
feat: export user-defined environment variables to lifecycle actions (#9514)
1 parent b79f45e commit 795e3b5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/controller/component/synthesize_component.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ func BuildSynthesizedComponent(ctx context.Context, cli client.Reader,
121121
InstanceUpdateStrategy: comp.Spec.InstanceUpdateStrategy,
122122
}
123123

124-
if err = mergeUserDefinedEnv(synthesizeComp, comp); err != nil {
125-
return nil, err
126-
}
127-
128124
// build scheduling policy for workload
129125
scheduling.ApplySchedulingPolicyToPodSpec(synthesizeComp.PodSpec, comp.Spec.SchedulingPolicy)
130126

@@ -166,6 +162,10 @@ func BuildSynthesizedComponent(ctx context.Context, cli client.Reader,
166162
// build volume mounts after kb-agent containers
167163
buildVolumeMounts(synthesizeComp)
168164

165+
if err = mergeUserDefinedEnv(synthesizeComp, comp); err != nil {
166+
return nil, err
167+
}
168+
169169
if err = buildServiceReferences(ctx, cli, synthesizeComp, compDef, comp); err != nil {
170170
return nil, errors.Wrap(err, "build service references failed")
171171
}

0 commit comments

Comments
 (0)