Skip to content

Commit

Permalink
Merge pull request #18 from openinfradev/argocd_add_custom_health_for…
Browse files Browse the repository at this point in the history
…_capi_md

argocd: add custom health for cluster-api machinedeployment
  • Loading branch information
ktkfree authored Oct 17, 2023
2 parents 3879b95 + baece7c commit a5fdda9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions argocd-install/template-values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ server:
ignoreDifferences: |
jsonPointers:
- /spec/replicas
health.lua: |
hs = {}
if obj.spec ~= nil and obj.status ~= nil then
if obj.spec.replicas == obj.status.replicas then
hs.status = "Healthy"
hs.message = "All machines targeted by this deployment were created"
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for machines for this deployment"
return hs
monitoring.coreos.com/Prometheus:
health.lua: |
health_status = {}
Expand Down
13 changes: 13 additions & 0 deletions argocd-install/values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ server:
ignoreDifferences: |
jsonPointers:
- /spec/replicas
health.lua: |
hs = {}
if obj.spec ~= nil and obj.status ~= nil then
if obj.spec.replicas == obj.status.replicas then
hs.status = "Healthy"
hs.message = "All machines targeted by this deployment were created"
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for machines for this deployment"
return hs
monitoring.coreos.com/Prometheus:
health.lua: |
health_status = {}
Expand Down

0 comments on commit a5fdda9

Please sign in to comment.