mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 17:51:36 +01:00
helm: add option for external db (#15722)
This commit is contained in:
parent
3447bd2f80
commit
55a6b54f8e
12 changed files with 41 additions and 1 deletions
|
@ -30,6 +30,7 @@ dependencies:
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
version: "8.x.x"
|
version: "8.x.x"
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://charts.bitnami.com/bitnami
|
||||||
|
condition: postgresql.enabled
|
||||||
- name: redis
|
- name: redis
|
||||||
version: "10.x.x"
|
version: "10.x.x"
|
||||||
repository: https://charts.bitnami.com/bitnami
|
repository: https://charts.bitnami.com/bitnami
|
||||||
|
|
|
@ -5,7 +5,11 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "mastodon.labels" . | nindent 4 }}
|
{{- include "mastodon.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
DB_HOST: {{ template "mastodon.postgresql.fullname" . }}
|
DB_HOST: {{ template "mastodon.postgresql.fullname" . }}
|
||||||
|
{{- else }}
|
||||||
|
DB_HOST: {{ .Values.postgresql.postgresqlHostname }}
|
||||||
|
{{- end }}
|
||||||
DB_NAME: {{ .Values.postgresql.postgresqlDatabase }}
|
DB_NAME: {{ .Values.postgresql.postgresqlDatabase }}
|
||||||
DB_POOL: {{ .Values.application.sidekiq.concurrency | quote }}
|
DB_POOL: {{ .Values.application.sidekiq.concurrency | quote }}
|
||||||
DB_PORT: "5432"
|
DB_PORT: "5432"
|
||||||
|
|
|
@ -55,7 +55,7 @@ spec:
|
||||||
{{- if .Values.postgresql.enabled }}
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
{{- else }}
|
{{- else }}
|
||||||
name: {{ template "mastodon.fullname" . }}-postgresql
|
name: {{ template "mastodon.fullname" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
|
|
|
@ -73,7 +73,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -43,7 +43,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -59,7 +59,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -53,7 +53,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -54,7 +54,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -59,7 +59,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -53,7 +53,11 @@ spec:
|
||||||
- name: "DB_PASS"
|
- name: "DB_PASS"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
{{- if .Values.postgresql.enabled }}
|
||||||
name: {{ .Release.Name }}-postgresql
|
name: {{ .Release.Name }}-postgresql
|
||||||
|
{{- else }}
|
||||||
|
name: {{ template "mastodon.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
key: postgresql-password
|
key: postgresql-password
|
||||||
- name: "REDIS_PASSWORD"
|
- name: "REDIS_PASSWORD"
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|
|
@ -26,3 +26,6 @@ data:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
VAPID_PUBLIC_KEY: {{ required "vapid.public_key is required" .Values.secrets.vapid.public_key }}
|
VAPID_PUBLIC_KEY: {{ required "vapid.public_key is required" .Values.secrets.vapid.public_key }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if not .Values.postgresql.enabled }}
|
||||||
|
postgresql-password: "{{ .Values.postgresql.postgresqlPassword | b64enc }}"
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -95,6 +95,10 @@ elasticsearch:
|
||||||
|
|
||||||
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
|
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
|
||||||
postgresql:
|
postgresql:
|
||||||
|
# disable if you want to use an existing db; in which case the values below
|
||||||
|
# must match those of that external postgres instance
|
||||||
|
enabled: true
|
||||||
|
# postgresqlHostname: preexisting-postgresql
|
||||||
postgresqlDatabase: mastodon_production
|
postgresqlDatabase: mastodon_production
|
||||||
# you must set a password; the password generated by the postgresql chart will
|
# you must set a password; the password generated by the postgresql chart will
|
||||||
# be rotated on each upgrade:
|
# be rotated on each upgrade:
|
||||||
|
|
Loading…
Reference in a new issue