Skip to content

Commit 5a70d78

Browse files
committed
fix: add role for service access
Workaround for timescale/helm-charts#610
1 parent 5c3f572 commit 5a70d78

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#TODO: remove once https://github.com/timescale/helm-charts/pull/610 is merged and released
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: Role
4+
metadata:
5+
namespace: {{ .Release.Namespace}}
6+
name: {{ include "helix.fullname" . }}-db-services
7+
labels:
8+
{{- include "helix.labels" . | nindent 4 }}
9+
app.kubernetes.io/component: rbac
10+
rules:
11+
- apiGroups: [""]
12+
resources: ["services"]
13+
verbs: ["create", "get", "list", "patch", "update", "watch", "delete"]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{- $timescaledb := index .Values "timescaledb-single" }}
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: RoleBinding
4+
metadata:
5+
name: {{ include "helix.fullname" . }}-db-services
6+
namespace: {{ .Release.Namespace}}
7+
labels:
8+
{{- include "helix.labels" . | nindent 4 }}
9+
app.kubernetes.io/component: rbac
10+
subjects:
11+
- kind: ServiceAccount
12+
name: {{ default $timescaledb.fullnameOverride $timescaledb.serviceAccount.name }}
13+
roleRef:
14+
kind: Role
15+
name: {{ include "helix.fullname" . }}-db-services
16+
apiGroup: rbac.authorization.k8s.io

0 commit comments

Comments
 (0)