7a9a3054 by Adam Heath

Add helmfile that combines bitnami-postgresql and postgresql-rclone.

1 parent 96817b15
---
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
- name: postgresql-rclone
url: git+https://gitlab.brainfood.com/brainfood/k8s-postgresql.git@charts/postgresql-rclone?ref=master
releases:
- name: {{ .Values.chart.namePrefix }}postgresql
namespace: {{ .Values.chart.namespace }}
chart: bitnami/postgresql
dependencies:
- chart: postgresql-rclone/postgresql-rclone
alias: postgresql-rclone
version: 0.0.0
values:
# Defaults
- ./values.yaml
# Overlay passed in values
- {{ omit .Values "rclone" "backup" "restore" "postgresql-rclone" | toYaml | nindent 8 }}
# Merge array-based things
- primary:
extraVolumeMounts:
{{- range (.Values | get "primary.extraVolumeMounts" list) }}
- {{ . | toYaml | indent 14 }}
{{- end }}
- name: rclone-restores
mountPath: /docker-entrypoint-initdb.d
extraVolumes:
{{- range (.Values | get "primary.extraVolumes" list) }}
- {{ . | toYaml | nindent 14 }}
{{- end }}
- name: rclone-restores
persistentVolumeClaim:
claimName: {{ .Values.chart.namePrefix }}postgresql-rclone-restores
initContainers:
- name: wait-for-restore-ready
image: bash:latest
volumeMounts:
- name: rclone-restores
mountPath: /docker-entrypoint-initdb.d
command:
- bash
- -cx
- |-
until [ -f /docker-entrypoint-initdb.d/.restored ]; do
sleep 5
done
{{- range (.Values | get "primary.initContainers" list) }}
- {{ . | toYaml | nindent 14 }}
{{- end }}
# Configure the sub-chart
- postgresql-rclone:
nameOverride: "rclone"
postgresql:
host: {{ .Values.chart.namePrefix }}postgresql
auth:
postgresqlUser: postgres
postgresqlPassword: {{ .Values.auth.postgresPassword }}
databases:
- {{ .Values.auth.database }}
rclone: {{ .Values.rclone | toYaml | nindent 12 }}
backup: {{ .Values.backup | toYaml | nindent 12 }}
restore: {{ .Values.restore | toYaml | nindent 12 }}
chart:
namePrefix: ""
namespace: default
auth:
usePasswordFiles: true
metrics:
enabled: true
rclone:
enabled: true
backup:
pvc:
size: 8Gi
restore:
pvc:
size: 8Gi
primary:
persistence:
size: 8Gi