Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/timescaledb-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
apiVersion: v1
name: timescaledb-single
description: 'TimescaleDB HA Deployment.'
version: 0.33.2
version: 0.34.0
icon: https://cdn.iconscout.com/icon/free/png-256/timescaledb-1958407-1651618.png

# appVersion specifies the version of the software, which can vary wildly,
Expand Down
1 change: 1 addition & 0 deletions charts/timescaledb-single/docs/admin-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The following table lists the configurable parameters of the TimescaleDB Helm ch
| `patroni` | Specify your specific [Patroni Configuration](https://patroni.readthedocs.io/en/latest/SETTINGS.html) | A full Patroni configuration |
| `persistentVolumes.<name>.accessModes` | Persistent Volume access modes | `[ReadWriteOnce]` |
| `persistentVolumes.<name>.annotations` | Annotations for Persistent Volume Claim| `{}` |
| `persistentVolumes.<name>.existingClaim` | Name of an existing pvc to use instead of creating a new Persistent Volume Claim | `""` |
| `persistentVolumes.<name>.size` | Persistent Volume size | `2Gi` |
| `persistentVolumes.<name>.storageClass`| Persistent Volume Storage Class | `volume.alpha.kubernetes.io/storage-class: default` |
| `persistentVolumes.<name>.subPath`| Subdirectory of Persistent Volume to mount | `""` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ spec:
- name: shared-memory
mountPath: /dev/shm
{{- end }}
{{- range $tablespaceName := ( .Values.persistentVolumes.tablespaces | default dict | keys ) }}
{{- range $tablespaceName, $volume := ( .Values.persistentVolumes.tablespaces | default dict ) }}
- name: {{ $tablespaceName }}
mountPath: {{ printf "%s/%s" (include "tablespaces_dir" $) $tablespaceName }}
subPath: {{ $volume.subPath | quote }}
{{- end }}
- mountPath: /etc/timescaledb/patroni.yaml
subPath: patroni.yaml
Expand Down Expand Up @@ -388,9 +389,10 @@ spec:
mountPath: {{ .Values.persistentVolumes.wal.mountPath | quote }}
subPath: {{ .Values.persistentVolumes.wal.subPath | quote }}
{{- end }}
{{- range $tablespaceName := ( .Values.persistentVolumes.tablespaces | default dict | keys ) }}
{{- range $tablespaceName, $volume := ( .Values.persistentVolumes.tablespaces | default dict ) }}
- name: {{ $tablespaceName }}
mountPath: {{ printf "%s/%s" (include "tablespaces_dir" $) $tablespaceName }}
subPath: {{ $volume.subPath | quote }}
{{- end }}
- mountPath: /etc/pgbackrest
name: pgbackrest
Expand Down Expand Up @@ -532,11 +534,28 @@ spec:
- name: storage-volume
emptyDir: {}
{{- end }}
{{- if and .Values.persistentVolumes.data.enabled .Values.persistentVolumes.data.existingClaim }}
- name: storage-volume
persistentVolumeClaim:
claimName: {{ .Values.persistentVolumes.data.existingClaim }}
{{- end }}
{{- if and .Values.persistentVolumes.wal.enabled .Values.persistentVolumes.wal.existingClaim }}
- name: wal-volume
persistentVolumeClaim:
claimName: {{ .Values.persistentVolumes.wal.existingClaim }}
{{- end }}
{{- range $tablespaceName, $volume := ($.Values.persistentVolumes.tablespaces | default dict ) }}
{{- if $volume.existingClaim }}
- name: {{ $tablespaceName }}
persistentVolumeClaim:
claimName: {{ $volume.existingClaim }}
{{- end }}
{{- end }}
{{- if .Values.prometheus.volumes }}
{{ .Values.prometheus.volumes | toYaml | nindent 6 }}
{{- end }}
volumeClaimTemplates:
{{- if .Values.persistentVolumes.data.enabled }}
{{- if and .Values.persistentVolumes.data.enabled (not .Values.persistentVolumes.data.existingClaim) }}
- metadata:
name: storage-volume
annotations:
Expand All @@ -551,7 +570,7 @@ spec:
purpose: data-directory
spec:
accessModes:
{{ toYaml .Values.persistentVolumes.data.accessModes | nindent 8 }}
{{- toYaml .Values.persistentVolumes.data.accessModes | nindent 8 }}
resources:
requests:
storage: "{{ .Values.persistentVolumes.data.size }}"
Expand All @@ -563,7 +582,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.persistentVolumes.wal.enabled }}
{{- if and .Values.persistentVolumes.wal.enabled (not .Values.persistentVolumes.wal.existingClaim) }}
- metadata:
name: wal-volume
annotations:
Expand All @@ -578,7 +597,7 @@ spec:
purpose: wal-directory
spec:
accessModes:
{{ toYaml .Values.persistentVolumes.wal.accessModes | nindent 8 }}
{{- toYaml .Values.persistentVolumes.wal.accessModes | nindent 8 }}
resources:
requests:
storage: "{{ .Values.persistentVolumes.wal.size }}"
Expand All @@ -591,10 +610,11 @@ spec:
{{- end }}
{{- end }}
{{- range $tablespaceName, $volume := ($.Values.persistentVolumes.tablespaces | default dict ) }}
{{- if not $volume.existingClaim }}
- metadata:
name: {{ $tablespaceName }}
annotations:
{{ $volume.annotations | default dict | toYaml | nindent 10 }}
{{- $volume.annotations | default dict | toYaml | nindent 10 }}
labels:
app: {{ template "timescaledb.fullname" $ }}
release: {{ $.Release.Name }}
Expand All @@ -604,9 +624,10 @@ spec:
purpose: tablespace
spec:
accessModes:
{{ $volume.accessModes | default (list "ReadWriteOnce") | toYaml | nindent 8 }}
{{- $volume.accessModes | default (list "ReadWriteOnce") | toYaml | nindent 8 }}
resources:
requests:
storage: "{{ $volume.size }}"
storageClassName: {{ $volume.storageClass | default "" }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/timescaledb-single/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
"enabled": {
"type": "boolean"
},
"existingClaim": {
"type": "string"
},
"mountPath": {
"type": "string"
},
Expand Down
2 changes: 2 additions & 0 deletions charts/timescaledb-single/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -614,3 +614,5 @@ definitions:
type: array
items:
type: string
existingClaim:
type: string
14 changes: 14 additions & 0 deletions charts/timescaledb-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ persistentVolumes:
annotations: {}
accessModes:
- ReadWriteOnce
# Use a existing PVC which must be created manually before bound
existingClaim: ""
# WAL will be a subdirectory of the data volume, which means enabling a separate
# volume for the WAL files should just work for new pods.
wal:
Expand All @@ -396,13 +398,25 @@ persistentVolumes:
annotations: {}
accessModes:
- ReadWriteOnce
# Use a existing PVC which must be created manually before bound
existingClaim: ""
# Any tablespace mentioned here requires a volume that will be associated with it.
# tablespaces:
# example1:
# annotations: {}
# accessModes:
# - ReadWriteOnce
# existingClaim: ""
# size: 5Gi
# subPath: ""
# storageClass: gp2
# example2:
# annotations: {}
# accessModes:
# - ReadWriteOnce
# existingClaim: ""
# size: 5Gi
# subPath: ""
# storageClass: gp2

resources: {}
Expand Down