-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(appset): grab the application status from redis #21455
base: master
Are you sure you want to change the base?
feat(appset): grab the application status from redis #21455
Conversation
…urceHealth is false Signed-off-by: rumstead <[email protected]>
❗ Preview Environment deployment failed on BunnyshellSee: Environment Details | Pipeline Logs Available commands (reply to this comment):
|
statusMap := appsetstatus.GetResourceStatusMap(appset) | ||
statusMap = appsetstatus.BuildResourceStatus(statusMap, apps) | ||
// if any application uses apptree instead of inline, grab all the statuses from the cache instead of the CRs | ||
isAppTree := appsetstatus.AppsUseAppTree(apps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I could expose the config from argocd-cmd-params-cm
to the server and pass it all the way down but we are already doing a check like this for applications in the server.
cache, err := cacheSource() | ||
errors.CheckError(err) | ||
var appStatusProvider status.AppResourceStatusProvider | ||
if persistResourceHealth { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of passing down persistResourceHealth
I could also check each application for ResourceHealthLocationAppTree
and if one application has it, grab all the resources from redis.
valueFrom: | ||
configMapKeyRef: | ||
name: argocd-cmd-params-cm | ||
key: controller.resource.health.persist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentionally using controller.
vs applicationset.
since we would want the user to only configure this once to enable it.
@@ -841,7 +839,6 @@ const ( | |||
ApplicationSetReasonErrorOccurred = "ErrorOccurred" | |||
ApplicationSetReasonApplicationSetUpToDate = "ApplicationSetUpToDate" | |||
ApplicationSetReasonParametersGenerated = "ParametersGenerated" | |||
ApplicationSetReasonApplicationGenerated = "ApplicationGeneratedSuccessfully" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
@@ -851,7 +848,6 @@ const ( | |||
ApplicationSetReasonApplicationValidationError = "ApplicationValidationError" | |||
ApplicationSetReasonApplicationSetModified = "ApplicationSetModified" | |||
ApplicationSetReasonApplicationSetRolloutComplete = "ApplicationSetRolloutComplete" | |||
ApplicationSetReasonSyncApplicationError = "SyncApplicationError" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused
Signed-off-by: rumstead <[email protected]>
Signed-off-by: rumstead <[email protected]>
closes #10312
Checklist: