From b02c4cc9124a6a166fc00164829c21cde347e159 Mon Sep 17 00:00:00 2001 From: Alex Manning Date: Thu, 6 Jul 2023 20:18:53 +0100 Subject: [PATCH] Add initcontainer to download more voices. --- charts/piper/templates/deployment.yaml | 13 +++++++++++++ charts/piper/values.yaml | 2 ++ 2 files changed, 15 insertions(+) diff --git a/charts/piper/templates/deployment.yaml b/charts/piper/templates/deployment.yaml index 8a61ba3..d595de7 100644 --- a/charts/piper/templates/deployment.yaml +++ b/charts/piper/templates/deployment.yaml @@ -24,6 +24,19 @@ spec: {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{ if .Values.downloadVoices }} + initContainers: + - name: download-voices + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: registry.fedoraproject.org/fedora-minimal + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: curl --remote-name-all {{ join " " .Values.downloadVoices }} + workingDir: /data + volumeMounts: + - name: data + mountPath: /data + {{ endif }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/piper/values.yaml b/charts/piper/values.yaml index 1dcf8f1..d136f31 100644 --- a/charts/piper/values.yaml +++ b/charts/piper/values.yaml @@ -51,3 +51,5 @@ pvc: existingClaim: "" storageClassName : "" storage: 1Gi + +downloadVoices: []