aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/timescaledb/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/timescaledb/templates')
-rw-r--r--kubernetes/common/timescaledb/templates/statefulset.yaml32
1 files changed, 11 insertions, 21 deletions
diff --git a/kubernetes/common/timescaledb/templates/statefulset.yaml b/kubernetes/common/timescaledb/templates/statefulset.yaml
index 653326be5f..031241dbaf 100644
--- a/kubernetes/common/timescaledb/templates/statefulset.yaml
+++ b/kubernetes/common/timescaledb/templates/statefulset.yaml
@@ -29,27 +29,12 @@ spec:
metadata: {{- include "common.templateMetadata" (dict "ignoreHelmChart" true "dot" . ) | nindent 6 }}
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" . }}
+ {{ include "common.podSecurityContext" . | indent 6 | trim}}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 10 | trim}}
ports: {{ include "common.containerPorts" . | nindent 12 }}
livenessProbe:
exec:
@@ -80,10 +65,15 @@ spec:
mountPath: /docker-entrypoint-initdb.d
- name: {{ include "common.fullname" . }}
mountPath: /var/lib/postgresql/data
+ - name: var-run
+ mountPath: /var/run/postgresql
volumes:
- name: {{ include "common.fullname" . }}-init
configMap:
name: {{ include "common.fullname" . }}-init
+ - name: var-run
+ emptyDir:
+ sizeLimit: {{ .Values.dirSizes.varDir.sizeLimit }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -94,9 +84,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 }}