Skip to content

Commit 46def8b

Browse files
authored
Set API workflow to succeeded and not running once min replicas are met (#449)
1 parent 47c5b06 commit 46def8b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/operator/workloads/api_workload.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ func (aw *APIWorkload) IsSucceeded(ctx *context.Context) (bool, error) {
147147
if err != nil {
148148
return false, err
149149
}
150-
requestedReplicas := getRequestedReplicasFromDeployment(api, k8sDeployment, nil)
151-
if updatedReplicas < requestedReplicas {
150+
if updatedReplicas < api.Compute.MinReplicas {
152151
return false, nil
153152
}
154153

@@ -175,8 +174,7 @@ func (aw *APIWorkload) IsRunning(ctx *context.Context) (bool, error) {
175174
if err != nil {
176175
return false, err
177176
}
178-
requestedReplicas := getRequestedReplicasFromDeployment(api, k8sDeployment, nil)
179-
if updatedReplicas < requestedReplicas {
177+
if updatedReplicas < api.Compute.MinReplicas {
180178
return true, nil
181179
}
182180

0 commit comments

Comments
 (0)