Skip to content

Commit 7deb17a

Browse files
committed
wip: hibernating status
1 parent d5e2b08 commit 7deb17a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/deployment/deployedApp/status/resourceTree/ResourceTreeService.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ func (impl *ServiceImpl) FetchResourceTree(ctx context.Context, appId int, envId
251251
} else {
252252
resourceTree["status"] = applicationStatus
253253
}
254+
if applicationStatus == argoApplication.Healthy {
255+
status, err := impl.appListingService.ISLastReleaseStopType(appId, envId)
256+
if err != nil {
257+
impl.logger.Errorw("service err, FetchAppDetailsV2", "err", err, "app", appId, "env", envId)
258+
} else if status {
259+
resourceTree["status"] = argoApplication.HIBERNATING
260+
}
261+
}
254262
} else {
255263
impl.logger.Warnw("appName and envName not found - avoiding resource tree call", "app", cdPipeline.DeploymentAppName, "env", cdPipeline.Environment.Name)
256264
}

0 commit comments

Comments
 (0)