ArgoCD has the capability to monitor health based on lua scripts.
Here is the appropriate script to monitor the terraform operator:
# Enable the health assessment of terraform
resource.customizations.health.tf.galleybytes.com_Terraform: |
hs = {}
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.phase ~= nil then
if obj.status.phase == "initializing" or obj.status.phase == "running" or obj.status.phase == "initializing-delete" or obj.status.phase == "deleting" then
if obj.status.stage.state == "failed" then
hs.status = "Degraded"
else
hs.status = "Progressing"
end
elseif obj.status.phase == "completed" then
hs.status = "Healthy"
else
hs.status = "Degraded"
end
end
if obj.status.stage ~= nil then
if obj.status.stage.message ~= nil then
hs.message = obj.status.stage.message
end
end
end
return hs
PS. Still cannot find the doc repo to make PR to add to docs.
ArgoCD has the capability to monitor health based on lua scripts.
Here is the appropriate script to monitor the terraform operator:
PS. Still cannot find the doc repo to make PR to add to docs.