diff --git a/charts/posthog/templates/clickhouse_instance.yaml b/charts/posthog/templates/clickhouse_instance.yaml index f39529ac4..5b87e0110 100644 --- a/charts/posthog/templates/clickhouse_instance.yaml +++ b/charts/posthog/templates/clickhouse_instance.yaml @@ -81,8 +81,9 @@ spec: nodeSelector: {{ toYaml .Values.clickhouse.nodeSelector | nindent 12 }} {{- end }} - {{- if .Values.clickhouse.persistence.enabled }} + {{- if or .Values.clickhouse.persistence.enabled .Values.clickhouse.extraVolumes }} volumes: + {{- if .Values.clickhouse.persistence.enabled }} {{- if .Values.clickhouse.persistence.existingClaim }} - name: existing-volumeclaim persistentVolumeClaim: @@ -93,6 +94,10 @@ spec: claimName: data-volumeclaim-template {{- end }} {{- end }} + {{- with .Values.clickhouse.extraVolumes }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} {{- if .Values.clickhouse.securityContext.enabled }} securityContext: {{- omit .Values.clickhouse.securityContext "enabled" | toYaml | nindent 12 }} @@ -148,6 +153,9 @@ spec: ports: - name: backup-rest containerPort: 7171 + {{- with .Values.clickhouse.backup.extraVolumeMounts }} + volumeMounts: {{- toYaml . | nindent 16 }} + {{- end }} {{- end }} serviceTemplates: