@@ -183,7 +183,7 @@ func (t *componentWorkloadTransformer) reconcileReplicasStatus(ctx context.Conte
183183
184184func (t * componentWorkloadTransformer ) handleUpdate (transCtx * componentTransformContext , cli model.GraphClient , dag * graph.DAG ,
185185 synthesizedComp * component.SynthesizedComponent , comp * appsv1.Component , runningITS , protoITS * workloads.InstanceSet ) error {
186- start , stop , err := t .handleWorkloadStartNStop (synthesizedComp , runningITS , & protoITS )
186+ start , stop , err := t .handleWorkloadStartNStop (transCtx , synthesizedComp , runningITS , & protoITS )
187187 if err != nil {
188188 return err
189189 }
@@ -213,16 +213,16 @@ func (t *componentWorkloadTransformer) handleUpdate(transCtx *componentTransform
213213 return nil
214214}
215215
216- func (t * componentWorkloadTransformer ) handleWorkloadStartNStop (
217- synthesizedComp * component. SynthesizedComponent , runningITS * workloads.InstanceSet , protoITS * * workloads.InstanceSet ) (bool , bool , error ) {
216+ func (t * componentWorkloadTransformer ) handleWorkloadStartNStop (transCtx * componentTransformContext , synthesizedComp * component. SynthesizedComponent ,
217+ runningITS * workloads.InstanceSet , protoITS * * workloads.InstanceSet ) (bool , bool , error ) {
218218 var (
219219 stop = isCompStopped (synthesizedComp )
220220 start = ! stop && isWorkloadStopped (runningITS )
221221 )
222222 if start || stop {
223223 * protoITS = runningITS .DeepCopy () // don't modify the runningITS except for the replicas
224224 }
225- if stop {
225+ if stop && checkPostProvisionDone ( transCtx ) {
226226 return start , stop , t .stopWorkload (synthesizedComp , runningITS , * protoITS )
227227 }
228228 if start {
0 commit comments