Skip to content

Commit 31e0f42

Browse files
rumsteadManuelraa
andauthored
fix(appset): add applicationset leader election to roles and clean up (#14369) (#23976)
Signed-off-by: Manuelraa <kontakt@manuel-rapp.de> Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> Co-authored-by: Manuelraa <kontakt@manuel-rapp.de>
1 parent 998253a commit 31e0f42

12 files changed

Lines changed: 250 additions & 247 deletions

manifests/base/applicationset-controller/argocd-applicationset-controller-role.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ rules:
3838
- patch
3939
- update
4040
- apiGroups:
41-
- ''
41+
- ""
4242
resources:
4343
- events
4444
verbs:
@@ -48,20 +48,30 @@ rules:
4848
- patch
4949
- watch
5050
- apiGroups:
51-
- ''
51+
- ""
5252
resources:
5353
- secrets
5454
- configmaps
5555
verbs:
5656
- get
5757
- list
5858
- watch
59+
# argocd-applicationset-controller leader election rules
60+
# Create with resourceNames fails, so use a separate rule for the lease creation
5961
- apiGroups:
60-
- apps
61-
- extensions
62+
- coordination.k8s.io
6263
resources:
63-
- deployments
64+
- leases
65+
verbs:
66+
- create
67+
- apiGroups:
68+
- coordination.k8s.io
69+
resources:
70+
- leases
71+
resourceNames:
72+
# Defined in `cmd/argocd-applicationset-controller/commands/applicationset_controller.go`
73+
- 58ac56fa.applicationsets.argoproj.io
6474
verbs:
6575
- get
66-
- list
67-
- watch
76+
- update
77+
- create
Lines changed: 69 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,77 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRole
33
metadata:
4+
name: argocd-applicationset-controller
45
labels:
56
app.kubernetes.io/name: argocd-applicationset-controller
67
app.kubernetes.io/part-of: argocd
78
app.kubernetes.io/component: applicationset-controller
8-
name: argocd-applicationset-controller
99
rules:
10-
- apiGroups:
11-
- argoproj.io
12-
resources:
13-
- applications
14-
- applicationsets
15-
- applicationsets/finalizers
16-
verbs:
17-
- create
18-
- delete
19-
- get
20-
- list
21-
- patch
22-
- update
23-
- watch
24-
- apiGroups:
25-
- argoproj.io
26-
resources:
27-
- applicationsets/status
28-
verbs:
29-
- get
30-
- patch
31-
- update
32-
- apiGroups:
33-
- argoproj.io
34-
resources:
35-
- appprojects
36-
verbs:
37-
- get
38-
- list
39-
- watch
40-
- apiGroups:
41-
- ""
42-
resources:
43-
- events
44-
verbs:
45-
- create
46-
- get
47-
- list
48-
- patch
49-
- watch
50-
- apiGroups:
51-
- ""
52-
resources:
53-
- configmaps
54-
verbs:
55-
- create
56-
- update
57-
- delete
58-
- get
59-
- list
60-
- patch
61-
- watch
62-
- apiGroups:
63-
- ""
64-
resources:
65-
- secrets
66-
verbs:
67-
- get
68-
- list
69-
- watch
70-
- apiGroups:
71-
- apps
72-
- extensions
73-
resources:
74-
- deployments
75-
verbs:
76-
- get
77-
- list
78-
- watch
79-
- apiGroups:
80-
- coordination.k8s.io
81-
resources:
82-
- leases
83-
verbs:
84-
- create
85-
- delete
86-
- get
87-
- list
88-
- patch
89-
- update
90-
- watch
10+
- apiGroups:
11+
- argoproj.io
12+
resources:
13+
- applications
14+
- applicationsets
15+
- applicationsets/finalizers
16+
verbs:
17+
- create
18+
- delete
19+
- get
20+
- list
21+
- patch
22+
- update
23+
- watch
24+
- apiGroups:
25+
- argoproj.io
26+
resources:
27+
- appprojects
28+
verbs:
29+
- get
30+
- list
31+
- watch
32+
- apiGroups:
33+
- argoproj.io
34+
resources:
35+
- applicationsets/status
36+
verbs:
37+
- get
38+
- patch
39+
- update
40+
- apiGroups:
41+
- ""
42+
resources:
43+
- events
44+
verbs:
45+
- create
46+
- get
47+
- list
48+
- patch
49+
- watch
50+
- apiGroups:
51+
- ""
52+
resources:
53+
- secrets
54+
- configmaps
55+
verbs:
56+
- get
57+
- list
58+
- watch
59+
# argocd-applicationset-controller leader election rules
60+
# Create with resourceNames fails, so use a separate rule for the lease creation
61+
- apiGroups:
62+
- coordination.k8s.io
63+
resources:
64+
- leases
65+
verbs:
66+
- create
67+
- apiGroups:
68+
- coordination.k8s.io
69+
resources:
70+
- leases
71+
resourceNames:
72+
# Defined in `cmd/argocd-applicationset-controller/commands/applicationset_controller.go`
73+
- 58ac56fa.applicationsets.argoproj.io
74+
verbs:
75+
- get
76+
- update
77+
- create

manifests/core-install-with-hydrator.yaml

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/core-install.yaml

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifests/ha/install-with-hydrator.yaml

Lines changed: 23 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)