Skip to content

Commit e78c232

Browse files
authored
Merge pull request #10 from DoodleScheduling/rbac-DK-1854
added user cluster roles DK-1854
2 parents d4aef5d + 521ea91 commit e78c232

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{{- if .Values.clusterRBAC.enabled -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ template "k8sdb-controller.fullname" . }}-edit
6+
labels:
7+
app.kubernetes.io/name: {{ include "k8sdb-controller.name" . }}
8+
app.kubernetes.io/instance: {{ .Release.Name }}
9+
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
helm.sh/chart: {{ include "k8sdb-controller.chart" . }}
11+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
12+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
13+
annotations:
14+
{{- toYaml .Values.annotations | nindent 4 }}
15+
rules:
16+
- apiGroups:
17+
- "dbprovisioning.infra.doodle.com"
18+
resources:
19+
- mongodbdatabases
20+
- mongodbusers
21+
- postgresqldatabases
22+
- postgresqlusers
23+
verbs:
24+
- create
25+
- delete
26+
- get
27+
- list
28+
- patch
29+
- update
30+
- watch
31+
- apiGroups:
32+
- "dbprovisioning.infra.doodle.com"
33+
resources:
34+
- mongodbdatabases/status
35+
- mongodbusers/status
36+
- postgresqldatabases/status
37+
- postgresqlusers/status
38+
verbs:
39+
- get
40+
{{- end }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{- if .Values.clusterRBAC.enabled -}}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ template "k8sdb-controller.fullname" . }}-view
6+
labels:
7+
app.kubernetes.io/name: {{ include "k8sdb-controller.name" . }}
8+
app.kubernetes.io/instance: {{ .Release.Name }}
9+
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
helm.sh/chart: {{ include "k8sdb-controller.chart" . }}
11+
rbac.authorization.k8s.io/aggregate-to-view: "true"
12+
annotations:
13+
{{- toYaml .Values.annotations | nindent 4 }}
14+
rules:
15+
- apiGroups:
16+
- "dbprovisioning.infra.doodle.com"
17+
resources:
18+
- mongodbdatabases
19+
- mongodbusers
20+
- postgresqldatabases
21+
- postgresqlusers
22+
verbs:
23+
- get
24+
- list
25+
- watch
26+
- apiGroups:
27+
- "dbprovisioning.infra.doodle.com"
28+
resources:
29+
- mongodbdatabases/status
30+
- mongodbusers/status
31+
- postgresqldatabases/status
32+
- postgresqlusers/status
33+
verbs:
34+
- get
35+
{{- end }}

0 commit comments

Comments
 (0)