argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.95k stars 5.46k forks source link

Improvements to resource actions #2181

Open jessesuen opened 5 years ago

jessesuen commented 5 years ago

Features needed around application resource actions:

  1. we need a way to list all actions regardless if they are applicable or not. In other words, I should be able to run:
    argocd app actions list

    and it should show me all actions configured in the system.

Group/kind should be added as columns and the --kind and --group flags would become optional (today they are required).

  1. Invoking application actions should not consult the discovery script

Currently when running an action, a check is made to see if the object is in a state where the action is listed by the discovery script. This check is probably not necessary and may get in the way of idempotent scripting.

  1. We need a UI feature and action field which indicates whether or not an action is currently applicable.

This is actually the current behavior of actions today, but in order to support use case (1), we need the UI to examine a different field to decide whether or not to present it or not.

simster7 commented 5 years ago

I can take care of all of this (tied to #2110).

As you mentioned on https://github.com/argoproj/argo-cd/pull/2110#discussion_r315952349, we need to formalize a spec for the naming convention of action names. It seems like your suggestion would be action/<object kind>/<action name>, this is great because it will lift the need to include --kind when running actions.

Since <object kind>s are expected to have slashes, perhaps a better naming convention would be action/<object kind>:<action name>?

olivierlemasle commented 4 years ago

Resource actions should also be documented (no mention of them in current documentation).

edsonmarquezani commented 4 years ago

Had quite a hard time trying to figure out the exact format of this action/* kind of permission, for more granular RBAC. Documentation would be MUCH appreciated. (The only mention to it is action/*, which is not very helpful.)

andrii-korotkov-verkada commented 1 day ago

Seems like the docs are better now https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/#the-action-action