mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
21 lines
No EOL
582 B
Lua
21 lines
No EOL
582 B
Lua
local actions = {}
|
|
actions["force-promote"] = {
|
|
["disabled"] = true,
|
|
["iconClass"] = "fa-solid fa-fw fa-forward"
|
|
}
|
|
|
|
-- force-promote
|
|
local forcePromote = false
|
|
if (obj.metadata.labels ~= nil and obj.metadata.labels["numaplane.numaproj.io/upgrade-state"] == "in-progress") then
|
|
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
|
|
actions["force-promote"]["disabled"] = true
|
|
end
|
|
|
|
return actions |