argo-cd/resource_customizations/source.toolkit.fluxcd.io/GitRepository/actions/discovery.lua
Adrian Berger 7fdddbe59b
feat: Add custom resource actions for flux resources (#18922)
* feat: Add custom resource actions for flux resources
Signed-off-by: Adrian Berger <adrian.berger@bedag.ch>

* chore: Add upgrade docs, change annotation text

Signed-off-by: Adrian Berger <adrian.berger@bedag.ch>

---------

Signed-off-by: Adrian Berger <adrian.berger@bedag.ch>
2024-07-15 13:44:32 -04:00

18 lines
411 B
Lua

local actions = {}
actions["reconcile"] = {["disabled"] = true}
actions["suspend"] = {["disabled"] = true}
actions["resume"] = {["disabled"] = true}
local suspend = false
if obj.spec.suspend ~= nil then
suspend = obj.spec.suspend
end
if suspend then
actions["resume"]["disabled"] = false
else
actions["reconcile"]["disabled"] = false
actions["suspend"]["disabled"] = false
end
return actions