aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/timescaledb
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2024-08-13 07:00:05 +0000
committerGerrit Code Review <gerrit@onap.org>2024-08-13 07:00:05 +0000
commit2ce0437988709fd8af46c8f922f1d22d312e49f9 (patch)
tree138a5d7d40fb23dbfb216f58233e5c83ab6d56ff /kubernetes/common/timescaledb
parent57e1545490a36771596200a34cf1efe58181b243 (diff)
parentdbabc4be8ab3a55d76fab88dab356d43e3d59e19 (diff)
Merge "[COMMON] Synchronize common charts"
Diffstat (limited to 'kubernetes/common/timescaledb')
-rw-r--r--kubernetes/common/timescaledb/Chart.yaml2
-rw-r--r--kubernetes/common/timescaledb/templates/statefulset.yaml24
2 files changed, 21 insertions, 5 deletions
diff --git a/kubernetes/common/timescaledb/Chart.yaml b/kubernetes/common/timescaledb/Chart.yaml
index dd92121eb8..b0569eb662 100644
--- a/kubernetes/common/timescaledb/Chart.yaml
+++ b/kubernetes/common/timescaledb/Chart.yaml
@@ -33,4 +33,4 @@ dependencies:
repository: '@local'
- name: repositoryGenerator
version: ~13.x-0
- repository: 'file://../repositoryGenerator'
+ repository: '@local'
diff --git a/kubernetes/common/timescaledb/templates/statefulset.yaml b/kubernetes/common/timescaledb/templates/statefulset.yaml
index bee389f191..1d161f3945 100644
--- a/kubernetes/common/timescaledb/templates/statefulset.yaml
+++ b/kubernetes/common/timescaledb/templates/statefulset.yaml
@@ -30,6 +30,22 @@ spec:
spec:
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
{{ include "common.podSecurityContext" . | indent 10 | trim}}
+ initContainers:
+ # we shouldn't need this but for unknown reason, it's fsGroup is not
+ # applied
+ - name: fix-permission
+ command:
+ - /bin/sh
+ args:
+ - -c
+ - chown -R {{ .Values.securityContext.user_id }}:{{ .Values.securityContext.group_id }} /var/lib/postgresql/data
+ image: {{ include "repositoryGenerator.image.busybox" . }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ securityContext:
+ runAsUser: 0
+ volumeMounts:
+ - mountPath: /var/lib/postgresql/data
+ name: {{ include "common.fullname" . }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
@@ -78,9 +94,9 @@ spec:
{{- end }}
{{- with .Values.tolerations }}
tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
volumeClaimTemplates:
- {{ include "common.PVCTemplate" (dict "dot" . "suffix" "data" "persistenceInfos" .Values.persistence "ignoreHelmChart" true) | indent 6 | trim }}
-{{- end }}
+ {{- end }}