2025-05-29 15:24:32 +00:00
|
|
|
local actions = {}
|
|
|
|
|
actions["force-promote"] = {
|
|
|
|
|
["disabled"] = true,
|
|
|
|
|
["iconClass"] = "fa-solid fa-fw fa-forward"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- force-promote
|
|
|
|
|
local forcePromote = false
|
2025-12-18 14:05:53 +00:00
|
|
|
if obj.metadata.labels ~= nil and (obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress" or obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "trial") then
|
2025-05-29 15:24:32 +00:00
|
|
|
forcePromote = true
|
|
|
|
|
end
|
|
|
|
|
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/force-promote"] == "true") then
|
|
|
|
|
forcePromote = false
|
|
|
|
|
end
|
|
|
|
|
if forcePromote then
|
|
|
|
|
actions["force-promote"]["disabled"] = false
|
|
|
|
|
else
|
2025-08-25 19:08:34 +00:00
|
|
|
actions["force-promote"]["disabled"] = true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return actions
|