argo-cd/resource_customizations/core.humio.com/HumioView/health.lua
Togie Mcdogie 1cd6fcac4f
feat(health): Added Humio Operator Healthchecks (#11628)
* Added Humio Operator Healthchecks

Signed-off-by: togie6 <22466611+togie6@users.noreply.github.com>

* Retrigger CI pipeline

Signed-off-by: togie6 <22466611+togie6@users.noreply.github.com>

* Removed duplicate if statement from HumioView

Signed-off-by: togie6 <22466611+togie6@users.noreply.github.com>

* Add HumioCluster Health Check

Signed-off-by: togie6 <22466611+togie6@users.noreply.github.com>

---------

Signed-off-by: togie6 <22466611+togie6@users.noreply.github.com>
Co-authored-by: pasha-codefresh <pavel@codefresh.io>
2024-05-08 19:21:56 +03:00

26 lines
759 B
Lua

hs = {
status = "Progressing",
message = "Update in progress"
}
if obj.status ~= nil then
if obj.status.state ~= nil then
if obj.status.state == "Exists" then
hs.status = "Healthy"
hs.message = "Component state: Exists."
end
if obj.status.state == "NotFound" then
hs.status = "Missing"
hs.message = "Component state: NotFound."
end
if obj.status.state == "ConfigError" then
hs.status = "Degraded"
hs.message = "Component state: ConfigError."
end
if obj.status.state == "Unknown" then
hs.status = "Unknown"
hs.message = "Component state: Unknown."
end
end
return hs
end
return hs