Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions argocd.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,32 @@ configs:
# https://github.com/argoproj/argo-cd/issues/3781
# enables health check assessment for argocd applications as we are using sync-waves
# @ignored

resource.customizations.health.Service: |
Comment thread
hamzabouissi marked this conversation as resolved.
hs = {}

if obj.spec and obj.spec.externalIPs and #obj.spec.externalIPs > 0 then
hs.status = "Healthy"
hs.message = "Service is exposed via externalIPs"
return hs
end

if obj.spec.type == "LoadBalancer" then
if obj.status ~= nil and obj.status.loadBalancer ~= nil and obj.status.loadBalancer.ingress ~= nil and #obj.status.loadBalancer.ingress > 0 then
hs.status = "Healthy"
hs.message = "LoadBalancer has been provisioned"
else
-- If no ingress IP, the LoadBalancer is still being created.
hs.status = "Progressing"
hs.message = "Waiting for LoadBalancer to be provisioned"
end
else
hs.status = "Healthy"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this default to healthy?

hs.message = "Service is ready"
end

return hs

resource.customizations.health.argoproj.io_Application: |
hs = {}
hs.status = "Progressing"
Expand Down