-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argo-workflows-server fail to start because of lack of permission for serviceaccount #2159
Comments
Hi @tyuhara Is the workflow:
- create: true
- name: "argo-workflows"
+ serviceAccount:
+ create: true
+ name: "argo-workflows"
rbac:
create: true
...
I tried with below on kind cluster and didn't get error. I wonder I missed something... 🤔 # values.yaml
workflow:
serviceAccount:
create: true
name: "argo-workflows"
rbac:
create: true
controller:
workflowNamespaces:
- namespace-a
server:
sso:
enabled: false
|
Hi @yu-croco, thank you for the checking. crds:
install: false
singleNamespace: false
workflow:
serviceAccount:
create: true
name: "argo-workflows"
rbac:
create: true
controller:
workflowNamespaces:
- namespace-a
- namespace-b
server:
extraArgs: ["--auth-mode=sso"]
sso:
enabled: true
issuer: https://accounts.google.com
clientId:
name: argo-workflows-sso
key: client-id
clientSecret:
name: argo-workflows-sso
key: client-secret
redirectUrl: https://<mydomain>/oauth2/callback
rbac:
enabled: false And then server failed to start.
After turning |
Chart version: 0.31.0 Seeing the same issue with similar configuration. The server fails to start because it is unable to read service accounts cluster wide. https://argoproj.github.io/argo-workflows/argo-server-sso/#sso-rbac This tells me that if you want to authenticate to the server with SSO without using your SSO provider for RBAC control for users within argo workflows; you configure as follows:
The problem is that if you do that; the cluster role will not have the ability to access service accounts clusterwide - so you see errors like this:
Instead wouldn't we want that conditional to apply if the user has single namespace workflows set to false? |
Is this an issue with the chart or with Argo Workflows? Shouldn't the server not need to read the service accounts if rbac is disabled?
|
If I run the chart with The ClusterRole will now have:
The server will start fine, but I would need to create ServiceAccounts with rules for users to be able to do anything. If now I manually edit the ConfigMap, set |
This actually seems to be a duplicate of #1624, which was auto-closed as stale. The resolution there says to set
I might have to check the Argo source code to see if this is accurate. It might be trying to read a default SA or something. In which case, that would be a bug in the chart. If it's reading unintentionally, then that would be a bug upstream in Argo itself. |
Server currently requires SA RBACOk I did some tracing and the Argo Server does currently require The error occurs on start-up, which was a hint to the Server's initialization code, and indeed, when SSO is enabled, a new This is a bug upstream in Argo
I say currently because this statement is correct. The SA cache is only used when the SSO module lists So this does not need to be populated what-so-ever if RBAC is not enabled. Initialization should not create a I'll file a bug upstream and will make a PR to fix that 🙂 Secrets RBACNotably, the cache used to Will file a PR to update that too 😅 EDIT: See #2211 |
Sent a PR upstream to fix this: argoproj/argo-workflows#11426 |
Upstream fix will be available in v3.4.10+: argoproj/argo-workflows#11552 |
Describe the bug
Just a question. Regardless of whether
server.sso.rbac
is enabled, ServiceAccounts permission is required when creating a ServiceAccount in the Namespace specified in workflowNamespaces or when creating RoleBinding.Because of this, I could not start the argo-workflows-server due to lack of the permission.
argo-helm/charts/argo-workflows/templates/server/server-cluster-roles.yaml
Lines 57 to 66 in 047ba6b
Related helm chart
argo-workflows
Helm chart version
0.31.0
To Reproduce
Create a
values.yaml
like the one below and run it. Then it tries to create ServiceAccount named argo-workflows for workflow but fails because of lack of the permission.Expected behavior
Grant the list/get/watch against serviceaccounts resource regardless of whether
server.sso.rbac
is enabled.It would resolve the issue because of it.
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: