argo-cd/resource_customizations/stacks.crossplane.io/ClusterStackInstall/health.lua
Simon Rüegg 22bb1dd40f
feat: Implement Crossplane CRD health checks (#3581)
* Implement Crossplane CRD health checks

A health check for the ClusterStackInstall CRD to help Argo CD to wait
for a successful install.

Signed-off-by: Simon Rüegg <simon@rueggs.ch>

* Add VSHN to USERS.md

Signed-off-by: Simon Rüegg <simon@rueggs.ch>
2020-05-13 09:45:27 -07:00

20 lines
538 B
Lua

hs = {
status = "Progressing",
message = "Waiting for stack to be installed"
}
if obj.status ~= nil then
if obj.status.conditionedStatus ~= nil then
if obj.status.conditionedStatus.conditions ~= nil then
for i, condition in ipairs(obj.status.conditionedStatus.conditions) do
if condition.type == "Ready" then
hs.message = condition.reason
if condition.status == "True" then
hs.status = "Healthy"
return hs
end
end
end
end
end
end
return hs