argo-cd/resource_customizations/apps/Deployment/actions/discovery.lua
Ishita Sequeira 07f4034aaa
feat: lua script for pause/resume action for Deployments (#7293)
Signed-off-by: ishitasequeira <isequeir@redhat.com>
2021-09-29 17:58:35 -07:00

10 lines
219 B
Lua

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)}
return actions