charts/charts/piper/templates/deployment.yaml
Alex Manning d5722edd95
All checks were successful
ci/woodpecker/push/piper Pipeline was successful
Tweak command.
2023-07-06 20:28:21 +01:00

90 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "piper.fullname" . }}
labels:
{{- include "piper.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "piper.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "piper.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- 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"
{{ .Values.downloadVoices | toYaml }}
workingDir: /data
volumeMounts:
- name: data
mountPath: /data
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: wyoming
containerPort: 10200
protocol: TCP
livenessProbe:
tcpSocket:
port: wyoming
readinessProbe:
tcpSocket:
port: wyoming
resources:
{{- toYaml .Values.resources | nindent 12 }}
args:
- "--voice"
- {{ .Values.config.voice }}
volumeMounts:
- name: data
mountPath: /data
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: data
{{- if .Values.pvc.enabled }}
persistentVolumeClaim:
{{- if not .Values.pvc.existingClaim }}
claimName: {{ include "piper.fullname" . }}
{{- else }}
claimName: {{ .Values.pvc.existingClaim }}
{{- end }}
{{- else}}
emptyDir: {}
{{- end }}