Skip to content

Commit

Permalink
Grant Event creation permission clusterwide (instead of install names…
Browse files Browse the repository at this point in the history
…pace)

Signed-off-by: Jort Koopmans <[email protected]>
  • Loading branch information
jortkoopmans committed Sep 2, 2024
1 parent 234773c commit d0c3300
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 7 deletions.
15 changes: 15 additions & 0 deletions manifests/base/rbac/argocd-image-updater-clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: argocd-image-updater
app.kubernetes.io/part-of: argocd-image-updater
app.kubernetes.io/component: controller
name: argocd-image-updater
rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
15 changes: 15 additions & 0 deletions manifests/base/rbac/argocd-image-updater-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: argocd-image-updater
app.kubernetes.io/part-of: argocd-image-updater
app.kubernetes.io/component: controller
name: argocd-image-updater
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argocd-image-updater
subjects:
- kind: ServiceAccount
name: argocd-image-updater
7 changes: 0 additions & 7 deletions manifests/base/rbac/argocd-image-updater-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,3 @@ rules:
- list
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create

2 changes: 2 additions & 0 deletions manifests/base/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- argocd-image-updater-clusterrole.yaml
- argocd-image-updater-clusterrolebinding.yaml
- argocd-image-updater-role.yaml
- argocd-image-updater-rolebinding.yaml
- argocd-image-updater-sa.yaml
26 changes: 26 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ rules:
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: argocd-image-updater
app.kubernetes.io/part-of: argocd-image-updater
name: argocd-image-updater
rules:
- apiGroups:
- ""
resources:
Expand All @@ -57,6 +67,22 @@ subjects:
- kind: ServiceAccount
name: argocd-image-updater
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/name: argocd-image-updater
app.kubernetes.io/part-of: argocd-image-updater
name: argocd-image-updater
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: argocd-image-updater
subjects:
- kind: ServiceAccount
name: argocd-image-updater
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down

0 comments on commit d0c3300

Please sign in to comment.