Skip to content

Commit a21d3d2

Browse files
raks-ttrrajashe
andauthored
Add rbac permission for argocd to allow creating resources (#9130)
Co-authored-by: rrajashe <[email protected]>
1 parent 4f4133d commit a21d3d2

File tree

3 files changed

+54
-14
lines changed

3 files changed

+54
-14
lines changed

components/monitoring/logging/staging/base/dynatrace-operator/dynatrace-maintainers.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
kind: RoleBinding
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: dynatrace-maintainers
6+
namespace: dynatrace
7+
subjects:
8+
- kind: Group
9+
name: konflux-o11y
10+
roleRef:
11+
apiGroup: rbac.authorization.k8s.io
12+
kind: ClusterRole
13+
name: component-maintainer
14+
---
15+
# Role for ArgoCD to manage DynaKube resources in dynatrace namespace
16+
apiVersion: rbac.authorization.k8s.io/v1
17+
kind: Role
18+
metadata:
19+
name: dynakube-manager
20+
namespace: dynatrace
21+
annotations:
22+
argocd.argoproj.io/sync-wave: "0"
23+
rules:
24+
- apiGroups:
25+
- dynatrace.com
26+
resources:
27+
- dynakubes
28+
verbs:
29+
- get
30+
- list
31+
- watch
32+
- create
33+
- update
34+
- patch
35+
- delete
36+
---
37+
# RoleBinding to grant remote-argocd service account permissions to manage DynaKube resources
38+
apiVersion: rbac.authorization.k8s.io/v1
39+
kind: RoleBinding
40+
metadata:
41+
name: grant-argocd-dynakube-permissions
42+
namespace: dynatrace
43+
annotations:
44+
argocd.argoproj.io/sync-wave: "0"
45+
roleRef:
46+
apiGroup: rbac.authorization.k8s.io
47+
kind: Role
48+
name: dynakube-manager
49+
subjects:
50+
- kind: ServiceAccount
51+
name: remote-argocd
52+
namespace: remote-argocd
53+

components/monitoring/logging/staging/base/dynatrace-operator/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- dynatrace-operator.yaml
5-
- dynatrace-maintainers.yaml
5+
- dynatrace-rbac.yaml
66
- dynakube-secret.yaml
77
- dynakube.yaml
88

0 commit comments

Comments
 (0)