Skip to content

Commit

Permalink
Merge pull request #2023 from dnlopes/fix/ecs-ready-with-desired-count
Browse files Browse the repository at this point in the history
fix: take into consideration the DesiredCount/RunningCount for resource readiness
  • Loading branch information
MisterMX authored Apr 18, 2024
2 parents d00d524 + 1a1ce70 commit a55852f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/controller/ecs/service/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ func postObserve(_ context.Context, cr *svcapitypes.Service, resp *svcsdk.Descri

switch aws.StringValue(resp.Services[0].Status) {
case "ACTIVE":
cr.SetConditions(xpv1.Available())
if resp.Services[0].DesiredCount != resp.Services[0].RunningCount {
cr.SetConditions(xpv1.Creating())
} else {
cr.SetConditions(xpv1.Available())
}
case "DRAINING":
cr.SetConditions(xpv1.Deleting())
case "INACTIVE":
Expand Down

0 comments on commit a55852f

Please sign in to comment.