diff --git a/charts/incubator/funkwhale/Chart.yaml b/charts/incubator/funkwhale/Chart.yaml index f95c69d6ed6..e85938709fd 100644 --- a/charts/incubator/funkwhale/Chart.yaml +++ b/charts/incubator/funkwhale/Chart.yaml @@ -8,7 +8,7 @@ appVersion: "1.2.10" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 13.2.1 deprecated: false description: Funkwhale is designed to make it easy to listen to music you like, and to discover new artists. home: https://truecharts.org/charts/incubator/funkwhale @@ -27,4 +27,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/funkwhale - https://funkwhale.audio/ type: application -version: 2.1.10 +version: 3.0.0 diff --git a/charts/incubator/funkwhale/questions.yaml b/charts/incubator/funkwhale/questions.yaml index 08cd8c617ed..ca6fe48d0b2 100644 --- a/charts/incubator/funkwhale/questions.yaml +++ b/charts/incubator/funkwhale/questions.yaml @@ -10,29 +10,30 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} + + - variable: env + group: "App Configuration" + label: "Image Environment" + schema: + additional_attrs: true + type: dict + attrs: + - variable: FUNKWHALE_HOSTNAME + label: "FUNKWHALE_HOSTNAME" + description: "Container Variable FUNKWHALEHOSTNAME" + schema: + type: string + default: "yourdomain.funkwhale" + - variable: NESTED_PROXY + label: "NESTED_PROXY" + description: "Container Variable NESTEDPROXY Set to 1 when container is behind a reverse proxy." + schema: + type: string + default: "0" # Include{containerBasic} # Include{containerAdvanced} - - - variable: env - group: "App Configuration" - label: "Image Environment" - schema: - additional_attrs: true - type: dict - attrs: - - variable: FUNKWHALE_HOSTNAME - label: "FUNKWHALE_HOSTNAME" - description: "Container Variable FUNKWHALEHOSTNAME" - schema: - type: string - default: "yourdomain.funkwhale" - - variable: NESTED_PROXY - label: "NESTED_PROXY" - description: "Container Variable NESTEDPROXY Set to 1 when container is behind a reverse proxy." - schema: - type: string - default: "0" # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - variable: main label: "Main Service" @@ -54,7 +55,7 @@ questions: description: "This port exposes the container port on the service" schema: type: int - default: 3030 + default: 10236 required: true # Include{serviceExpertRoot} # Include{serviceExpert} diff --git a/charts/incubator/funkwhale/templates/NOTES.txt b/charts/incubator/funkwhale/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/funkwhale/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/funkwhale/templates/_secret.tpl b/charts/incubator/funkwhale/templates/_secret.tpl index 618074fddbb..d6fb708d4ae 100644 --- a/charts/incubator/funkwhale/templates/_secret.tpl +++ b/charts/incubator/funkwhale/templates/_secret.tpl @@ -1,21 +1,11 @@ {{/* Define the secret */}} {{- define "funkwhale.secret" -}} - -{{- $secretName := printf "%s-secret" (include "tc.common.names.fullname" .) -}} - ---- - -apiVersion: v1 -kind: Secret -type: Opaque -metadata: - name: {{ $secretName }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} +{{- $fetchname := printf "%s-secret" (include "tc.v1.common.lib.chart.names.fullname" $) -}} +{{- $key := randAlphaNum 32 -}} +{{- with (lookup "v1" "Secret" .Release.Namespace $fetchname) -}} + {{- $key = index .data "DJANGO_SECRET_KEY" | b64dec -}} +{{- end }} +enabled: true data: - {{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }} - DJANGO_SECRET_KEY: {{ (index .data "DJANGO_SECRET_KEY") }} - {{- else }} - DJANGO_SECRET_KEY: {{ randAlphaNum 32 | b64enc }} - {{- end }} + DJANGO_SECRET_KEY: {{ $key }} {{- end -}} diff --git a/charts/incubator/funkwhale/templates/common.yaml b/charts/incubator/funkwhale/templates/common.yaml index 066683a70af..b67b24fe862 100644 --- a/charts/incubator/funkwhale/templates/common.yaml +++ b/charts/incubator/funkwhale/templates/common.yaml @@ -1,8 +1,11 @@ {{/* Make sure all variables are set properly */}} -{{- include "tc.common.loader.init" . }} +{{- include "tc.v1.common.loader.init" . }} -{{/* Render secret */}} -{{- include "funkwhale.secret" . }} +{{/* Render secrets for Funkwhalte */}} +{{- $secrets := include "funkwhale.secret" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "secret" $secrets -}} +{{- end -}} {{/* Render the templates */}} -{{ include "tc.common.loader.apply" . }} +{{ include "tc.v1.common.loader.apply" . }} diff --git a/charts/incubator/funkwhale/values.yaml b/charts/incubator/funkwhale/values.yaml index 56299a41aae..4af67921fee 100644 --- a/charts/incubator/funkwhale/values.yaml +++ b/charts/incubator/funkwhale/values.yaml @@ -3,28 +3,32 @@ image: repository: tccr.io/truecharts/funkwhale tag: 1.2.10@sha256:835a4970cd330024e617e6b320f609b700ee79f042b57118ad761605fbd985d1 -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 - securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsGroup: 0 + runAsUser: 0 -env: - DJANGO_SECRET_KEY: - secretKeyRef: - name: '{{ printf "%s-secret" (include "tc.common.names.fullname" .) }}' - key: DJANGO_SECRET_KEY - FUNKWHALE_HOSTNAME: yourdomain.funkwhale - NESTED_PROXY: "0" +workload: + main: + podSpec: + containers: + main: + env: + FUNKWHALE_HOSTNAME: "yourdomain.funkwhale" + NESTED_PROXY: "0" + DJANGO_SECRET_KEY: + secretKeyRef: + name: secret + key: DJANGO_SECRET_KEY service: main: ports: main: port: 10236 - protocol: HTTP + protocol: http targetPort: 5000 persistence: @@ -34,7 +38,7 @@ persistence: musicpath: enabled: true mountPath: /music - readOnly: true portal: - enabled: true + open: + enabled: true