diff --git a/charts/funkwhale/Chart.yaml b/charts/funkwhale/Chart.yaml index a6e9534..6b18d03 100644 --- a/charts/funkwhale/Chart.yaml +++ b/charts/funkwhale/Chart.yaml @@ -4,14 +4,14 @@ appVersion: "1.2.9" description: A social platform to enjoy and share music icon: https://funkwhale.audio/favicon.png name: funkwhale -version: 0.7.0 +version: 1.0.0 dependencies: -- name: redis - version: ^15.7.0 - repository: https://charts.bitnami.com/bitnami - condition: redis.enabled - name: postgresql - version: ^10.9.4 + version: ^12.1.4 repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled +- name: redis + version: ^17.3.17 + repository: https://charts.bitnami.com/bitnami + condition: redis.enabled diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index c3e649c..473343e 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -12,14 +12,17 @@ Expand the name of the chart. {{- end -}} {{- define "funkwhale.dbUrl" -}} +{{- if (or .Values.postgresql.postgresqlUsername .Values.postgresql.postgresqlPassword .Values.postgresql.postgresqlDatabase) -}} +{{ fail "You are using the old postgresql auth config keys - please update your values to the new postgresql.auth config keys" }} +{{- end -}} {{- if .Values.database -}} {{ fail "You are using the old database config key - please update your values to the new postgresql config key" }} {{- else if and .Values.postgresql.enabled .Values.postgresql.host -}} {{ fail "Both postgresql.enabled and postgresql.host have been specified - you may want to set postgresql.enabled=false if you want to use an external database" }} {{- else if .Values.postgresql.enabled -}} -postgres://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ template "funkwhale.postgresql.host" . }}:{{ .Values.postgresql.service.port }}/{{ .Values.postgresql.postgresqlDatabase }} +postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ template "funkwhale.postgresql.host" . }}:{{ .Values.postgresql.service.port }}/{{ .Values.postgresql.auth.database }} {{- else if .Values.postgresql.host -}} -postgres://{{ .Values.postgresql.postgresqlUsername }}:{{ .Values.postgresql.postgresqlPassword }}@{{ .Values.postgresql.host }}:{{ .Values.postgresql.service.port }}/{{ .Values.postgresql.postgresqlDatabase }} +postgres://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ .Values.postgresql.host }}:{{ .Values.postgresql.service.port }}/{{ .Values.postgresql.auth.database }} {{- else -}} {{ fail "Either postgresql.enabled or postgresql.host are required!" }} {{- end -}} diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index f6c7fb3..83ff4c3 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -42,36 +42,40 @@ postgresql: ## External Postgresql hostname or IP # host: postgresql.example.com - ## Database user - postgresqlUsername: funkwhale + auth: + ## Database user + username: funkwhale - ## Database password - postgresqlPassword: funkwhale + ## Database password + password: funkwhale - ## Database password - postgresqlDatabase: funkwhale + ## Database password + database: funkwhale ## Database port service: port: 5432 - ## Database storage configuration - persistence: - enabled: true - # storageClass: "" - # size: 8Gi + primary: + ## Database storage configuration + persistence: + enabled: true + # storageClass: "" + # size: 8Gi - pgHbaConfiguration: | - local all all trust - host all all localhost trust - host all all 0.0.0.0/0 md5 - host all all ::/0 md5 - initdbScripts: - enable_extensions.sh: | - #!/bin/sh + pgHbaConfiguration: | + local all all trust + host all all localhost trust + host all all 0.0.0.0/0 md5 + host all all ::/0 md5 - echo 'create extension unaccent;' | psql -U postgres $POSTGRESQL_DATABASE - echo 'create extension citext;' | psql -U postgres $POSTGRESQL_DATABASE + initdb: + scripts: + enable_extensions.sh: | + #!/bin/sh + + echo 'create extension unaccent;' | psql -U postgres $POSTGRESQL_DATABASE + echo 'create extension citext;' | psql -U postgres $POSTGRESQL_DATABASE redis: ## If you already have a Redis service you'd like to use, set @@ -87,6 +91,7 @@ redis: architecture: standalone master: + kind: Deployment persistence: enabled: false service: