Summary
Custom health checks should be able to return specific messages about a resource being deleted. Right now it's hard-coded as "Pending deletion."
Motivation
Resources often have finalizers that get "stuck" - i.e. not cleaned up by the relevant controller. Users get confused. Argo CD can provide additional info via custom health checks to explain what the finalizer is for and what is responsible for cleaning it up.
Proposal
Right now, when deletionTimestamp is set, Argo CD returns a hard-coded Progressing/Pending deletion status and message.
Instead, we should look for and run any available Lua health script. If one is available, we should return Pending deletion: + the output message. We should hard-code the Progressing status to ensure consistent behavior and backwards compatibility.
If we don't have a custom health check, we should return the same Progressing/Pending deletion we return today.
Summary
Custom health checks should be able to return specific messages about a resource being deleted. Right now it's hard-coded as "Pending deletion."
Motivation
Resources often have finalizers that get "stuck" - i.e. not cleaned up by the relevant controller. Users get confused. Argo CD can provide additional info via custom health checks to explain what the finalizer is for and what is responsible for cleaning it up.
Proposal
Right now, when
deletionTimestampis set, Argo CD returns a hard-codedProgressing/Pending deletionstatus and message.Instead, we should look for and run any available Lua health script. If one is available, we should return
Pending deletion:+ the output message. We should hard-code theProgressingstatus to ensure consistent behavior and backwards compatibility.If we don't have a custom health check, we should return the same
Progressing/Pending deletionwe return today.