Files
Homelabv4/apps/argocd/manifests/argocd-health-checks.yaml
T
2026-03-09 20:21:35 -05:00

85 lines
2.8 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm-custom-health
namespace: argocd
labels:
app.kubernetes.io/part-of: argocd
annotations:
argocd.argoproj.io/sync-wave: "-1"
data:
resource.customizations.health.ceph.rook.io_CephCluster: |
hs = {}
if obj.status ~= nil then
if obj.status.phase == "Ready" and obj.status.ceph ~= nil and obj.status.ceph.health == "HEALTH_OK" then
hs.status = "Healthy"
hs.message = "CephCluster is healthy"
elseif obj.status.phase == "Progressing" then
hs.status = "Progressing"
hs.message = obj.status.message or "CephCluster is progressing"
else
hs.status = "Degraded"
hs.message = obj.status.message or "CephCluster is not healthy"
end
else
hs.status = "Progressing"
hs.message = "Waiting for CephCluster status"
end
return hs
resource.customizations.health.postgresql.cnpg.io_Cluster: |
hs = {}
if obj.status ~= nil then
if obj.status.phase == "Cluster in healthy state" then
hs.status = "Healthy"
hs.message = "CNPG Cluster is healthy"
elseif obj.status.phase == "Setting up primary" or obj.status.phase == "Creating primary" then
hs.status = "Progressing"
hs.message = obj.status.phase
else
hs.status = "Degraded"
hs.message = obj.status.phase or "CNPG Cluster is not healthy"
end
else
hs.status = "Progressing"
hs.message = "Waiting for CNPG Cluster status"
end
return hs
resource.customizations.health.external-secrets.io_ClusterSecretStore: |
hs = {}
if obj.status ~= nil and obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Ready" then
if condition.status == "True" then
hs.status = "Healthy"
hs.message = "ClusterSecretStore is ready"
else
hs.status = "Degraded"
hs.message = condition.message or "ClusterSecretStore is not ready"
end
return hs
end
end
end
hs.status = "Progressing"
hs.message = "Waiting for ClusterSecretStore status"
return hs
resource.customizations.health.kiali.io_Kiali: |
hs = {}
if obj.status ~= nil then
if obj.status.conditions ~= nil then
for i, condition in ipairs(obj.status.conditions) do
if condition.type == "Successful" and condition.status == "True" then
hs.status = "Healthy"
hs.message = "Kiali is healthy"
return hs
end
end
end
hs.status = "Progressing"
hs.message = "Kiali is being deployed"
else
hs.status = "Progressing"
hs.message = "Waiting for Kiali status"
end
return hs