feat: Add suspended status in custom resource health for flux resources (#19508)

Signed-off-by: Adrian Berger <adrian.berger@bedag.ch>
This commit is contained in:
Adrian Berger
2024-08-14 20:21:29 +02:00
committed by GitHub
parent ea362766db
commit 6296b178df
10 changed files with 50 additions and 0 deletions

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numFailing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0

View File

@@ -1,4 +1,9 @@
local hs = {}
if obj.spec.suspend ~= nil and obj.spec.suspend == true then
hs.message = obj.kind .. " is suspended"
hs.status = "Suspended"
return hs
end
if obj.status ~= nil then
if obj.status.conditions ~= nil then
local numProgressing = 0