これは何
組織でArgo Workflowsを利用するにあたって、ユーザー(のグループ)ごとに利用できる操作の種類を制御したい需要があったので、どの操作に何の権限が必要なのか調査しました。
例:Workflowを作成してもよいが削除してはならない、WorkflowTemplateの編集を許可・不許可、など
前提
"SSO RBAC"をセットアップ済みのArgo Workflow
https://argoproj.github.io/argo-workflows/argo-server-sso/#sso-rbac
ユーザーやユーザーグループは特定のServiceAccountに紐づけられ、Argo Workflows上ではそのServiceAccountの権限に基づいて操作が許可されます。

ここでは、Argo Workflows上での操作に対して、ServiceAccountにバインドするClusterRoleやRoleではどんな権限を許可すればいいのかを書きます。
※調べた範囲は、UIメニューでいうと上から4つ分(Workflows / Workflow Templates / Cluster Workflow Templates / Cron Workflows)

表の凡例
Workflow

Submit / Resubmit
https://argoproj.github.io/argo-workflows/cli/argo_submit/

resources |
verbs |
workflows |
create |
cronworkflows
submit --from cronworkflows/name の場合 |
get |
workflowtemplates
submit --from workflowtemplates/name の場合 |
get |
clusterworkflowtemplates
submit --from clusterworkflowtemplates/name の場合 |
get |
Terminate
https://argoproj.github.io/argo-workflows/cli/argo_terminate/

resources |
verbs |
workflows |
get / patch |
Stop
https://argoproj.github.io/argo-workflows/cli/argo_stop/

resources |
verbs |
workflows |
get / update / patch |
Delete
https://argoproj.github.io/argo-workflows/cli/argo_delete/

resources |
verbs |
workflows |
get / delete |
Retry
https://argoproj.github.io/argo-workflows/cli/argo_retry/

resources |
verbs |
workflows |
get / update |
pods |
delete |
Suspend
https://argoproj.github.io/argo-workflows/cli/argo_suspend/

resources |
verbs |
workflows |
get / update |
Resume
https://argoproj.github.io/argo-workflows/cli/argo_resume/

resources |
verbs |
workflows |
get / update |
WorkflowTemplate

Submit

resources |
verbs |
workflows |
create |
workflowtemplates |
get |
Create
https://argoproj.github.io/argo-workflows/cli/argo_template_create/

resources |
verbs |
workflowtemplates |
create |
Delete
https://argoproj.github.io/argo-workflows/cli/argo_template_delete/

resources |
verbs |
workflowtemplates |
get / delete |
Update
argo
コマンドはない(UIから行うか、kubectl edit
)

resources |
verbs |
workflowtemplates |
get / update |
ClusterWorkflowTemplate

Submit

resources |
verbs |
workflows |
create |
clusterworkflowtemplates |
get |
Create
https://argoproj.github.io/argo-workflows/cli/argo_cluster-template_create/

resources |
verbs |
clusterworkflowtemplates |
create |
Delete
https://argoproj.github.io/argo-workflows/cli/argo_cluster-template_delete/

resources |
verbs |
clusterworkflowtemplates |
get / delete |
Update
argo
コマンドはない(UIから行うか、kubectl edit
)

resources |
verbs |
clusterworkflowtemplates |
get / update |
CronWorkflow

Submit

resources |
verbs |
workflows |
create |
cronworkflows |
get |
Create
https://argoproj.github.io/argo-workflows/cli/argo_cron_create/

resources |
verbs |
workflowtemplates |
get |
clusterworkflowtemplates |
get |
cronworkflows |
create |
Delete
https://argoproj.github.io/argo-workflows/cli/argo_cron_delete/

resources |
verbs |
cronworkflows |
get / delete |
Update
argo
コマンドはない(UIから行うか、kubectl edit
)

resources |
verbs |
workflowtemplates |
get |
clusterworkflowtemplates |
get |
cronworkflows |
get / update |
Suspend
https://argoproj.github.io/argo-workflows/cli/argo_cron_suspend/

resources |
verbs |
cronworkflows |
patch |
Resume
https://argoproj.github.io/argo-workflows/cli/argo_cron_resume/

resources |
verbs |
cronworkflows |
patch |
終わりに
まとめた後でもう一度見ると大半が「それはそうだろう」という感じですが、当初はWorkflow<=>(Cluster)WorkflowTemplate, Workflow<=>CronWorkflowの関係もよくわかっておらず何を許可すれば何ができるのか謎に包まれていたので洗い出してすっきりしました。
あまり細かく制御しようとしても管理が煩雑になるので「特定のチームに所有権のあるNamespace内ではメンバーは自由に操作できる(操作の結果も含めて所有する)」くらいでもいいのかもしれません。
また「WorkflowのStopは許可したいが、Terminateは不許可としたい」のような実現不可能なケースもあることがわかりました(Stopに必要な権限がTerminateに必要な権限を包含しているため)。
調査時 参照したもの
Discussion