Skip to content

Commit c88ce6e

Browse files
Tanc010apecloud-bot
authored andcommitted
feat: export user-defined environment variables to lifecycle actions (#9514)
(cherry picked from commit 795e3b5)
1 parent d0b96ab commit c88ce6e

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
@@ -119,10 +119,6 @@ func BuildSynthesizedComponent(ctx context.Context, cli client.Reader,
119119
InstanceUpdateStrategy: comp.Spec.InstanceUpdateStrategy,
120120
}
121121

122-
if err = mergeUserDefinedEnv(synthesizeComp, comp); err != nil {
123-
return nil, err
124-
}
125-
126122
// build scheduling policy for workload
127123
scheduling.ApplySchedulingPolicyToPodSpec(synthesizeComp.PodSpec, comp.Spec.SchedulingPolicy)
128124

@@ -162,6 +158,10 @@ func BuildSynthesizedComponent(ctx context.Context, cli client.Reader,
162158
// build volume mounts after kb-agent containers
163159
buildVolumeMounts(synthesizeComp)
164160

161+
if err = mergeUserDefinedEnv(synthesizeComp, comp); err != nil {
162+
return nil, err
163+
}
164+
165165
if err = buildServiceReferences(ctx, cli, synthesizeComp, compDef, comp); err != nil {
166166
return nil, errors.Wrap(err, "build service references failed")
167167
}

0 commit comments

Comments
 (0)