argo-cd/resource_customizations/trident.netapp.io/TridentBackendConfig/health.lua
Balazs Zachar 7e68b1ef71
feat: add custom resource health checks for trident.netapp.io/TridentOrchestrator and trident.netapp.io/TridentBackendConfig (Closes [ISSUE #6550]) (#6552)
* feat: add custom resource health checks for trident.netapp.io/TridentOrchestrator and trident.netapp.io/TridentBackendConfig

Signed-off-by: Balazs Zachar <zachar.balazs@gmail.com>

* feat: extend TridentOrchestrator check with degraded state (based on official documentation)

Signed-off-by: Balazs Zachar <zachar.balazs@gmail.com>
2021-07-08 18:39:23 -07:00

16 lines
422 B
Lua

hs = {}
if obj.status ~= nil then
if obj.status.phase == "Bound" and obj.status.lastOperationStatus == "Success" then
hs.status = "Healthy"
hs.message = obj.status.message
return hs
end
if obj.status.lastOperationStatus == "Failed" then
hs.status = "Degraded"
hs.message = obj.status.message
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for backend creation"
return hs