Skip to content

Commit 40f9cb8

Browse files
committed
fix(argo-workflows): partially revert 8f5726d
The change was wrong that we didn't need to give the Argo Server and the Workflow Controller additional permissions in the argo namespace so this restores that but builds on the existing roles from upstream.
1 parent 6d4e8de commit 40f9cb8

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This is a role and rolebinding to provide the argo-server with permissions
2+
# it needs to run in its own namespace.
3+
# - to read the configmap for its configuration
4+
# - read the SSO secret
5+
# - create and read other secrets for auth tokens
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: Role
9+
metadata:
10+
name: argo-server-role
11+
rules:
12+
- apiGroups:
13+
- ""
14+
resources:
15+
- configmaps
16+
verbs:
17+
- get
18+
- watch
19+
resourceNames:
20+
- workflow-controller-configmap
21+
- apiGroups:
22+
- ""
23+
resources:
24+
- secrets
25+
verbs:
26+
- get
27+
- create
28+
resourceNames:
29+
- argo-sso
30+
- sso
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: RoleBinding
3+
metadata:
4+
name: argo-server-binding
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: Role
8+
name: argo-server-role
9+
subjects:
10+
- kind: ServiceAccount
11+
name: argo-server

components/argo/kustomization.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ resources:
1111
# to the ClusterRole for just the namespaces we want.
1212
- https://github.com/argoproj/argo-workflows/manifests/cluster-install/?ref=v3.6.10
1313

14+
# adds argo-server role so the argo-server has enough permissions to run
15+
- argo-server-role.yaml
16+
- argo-server-rolebinding.yaml
17+
1418
# ingress for workflows.${DNS_ZONE} to the argo server for the UI
1519
- ingress.yaml
1620

@@ -41,6 +45,13 @@ patches:
4145
name: argo-server-binding
4246
path: delete-argo-server-crb.yaml
4347

48+
- target:
49+
group: rbac.authorization.k8s.io
50+
version: v1
51+
kind: Role
52+
name: argo-role
53+
path: workflow-controller-role.yaml
54+
4455
# see the patch for details on the change
4556
- target:
4657
group: apps
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- op: add
3+
path: /rules/-
4+
value:
5+
apiGroups: [""]
6+
resources: ["configmaps"]
7+
verbs: ["get", "watch"]
8+
resourceNames: ["workflow-controller-configmap"]

0 commit comments

Comments
 (0)