Skip to content

Enable Resource Actions in clusterGroup chart#105

Merged
mbaldessari merged 3 commits intovalidatedpatterns:mainfrom
day0hero:resource_actions
Mar 25, 2026
Merged

Enable Resource Actions in clusterGroup chart#105
mbaldessari merged 3 commits intovalidatedpatterns:mainfrom
day0hero:resource_actions

Conversation

@day0hero
Copy link
Contributor

** Enables the existing feature of resource actions in the clusterGroup chart.

Reasoning

What do we gain from this? Enabling this allows us to make a better UX for our users where an action is required to be taken. For example, one pattern may need to scale the replicas of a deployment, another may need to patch a resource for DR failover/resync. Instead of having users run commands from the cli, or hunt for it in the UI, we can build a "button" of sorts to allow them to do this trivial task.

Resource Actions

Custom resource actions can be configured on the ArgoCD instance via clusterGroup.argoCD.resourceActions.
This allows defining Lua-based actions that appear in the ArgoCD UI for specific resource kinds.

For example, to add a "scale up" action for Deployments:

clusterGroup:
  argoCD:
    resourceActions:
      - group: apps
        kind: Deployment
        action: |
          local os = require("os")
          local actions = {}
          actions["scale-up"] = {["disabled"] = false}
          local replicas = 1
          if obj.spec.replicas ~= nil then
            replicas = obj.spec.replicas + 1
          end
          local patch = {["spec"] = {["replicas"] = replicas}}
          return actions, patch

@mbaldessari mbaldessari merged commit 45e5024 into validatedpatterns:main Mar 25, 2026
4 checks passed
@mbaldessari
Copy link
Contributor

Thanks. I regenerated the README via #106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants