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: []