mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-22 01:17:16 +00:00
Signed-off-by: Ratul Basak <ratulbasak93@gmail.com> Signed-off-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com> Co-authored-by: Alexandre Gaudreault <alexandre_gaudreault@intuit.com>
19 lines
384 B
Lua
19 lines
384 B
Lua
local actions = {}
|
|
actions["restart"] = {}
|
|
|
|
local paused = false
|
|
if obj.spec.paused ~= nil then
|
|
paused = obj.spec.paused
|
|
actions["pause"] = {paused}
|
|
end
|
|
actions["resume"] = {["disabled"] = not(paused)}
|
|
|
|
actions["scale"] = {
|
|
["params"] = {
|
|
{
|
|
["name"] = "replicas",
|
|
["default"] = tostring(obj.spec.replicas)
|
|
}
|
|
},
|
|
}
|
|
return actions
|