apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "audiomanager.fullname" . }} namespace: {{ include "audiomanager.namespace" . }} labels: {{- include "audiomanager.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate selector: matchLabels: {{- include "audiomanager.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "audiomanager.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: audiomanager image: "{{ include "audiomanager.image" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} env: - name: PORT value: "8080" - name: DATA_DIR value: /data - name: MEDIA_DIR value: /data/media - name: DOWNLOAD_DIR value: /data/downloads - name: USERS_FILE value: /etc/audiomanager/users.yaml - name: FFMPEG_PATH value: ffmpeg - name: YTDLP_PATH value: yt-dlp {{- with .Values.env }} {{- toYaml . | nindent 12 }} {{- end }} ports: - name: http containerPort: 8080 livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 10 periodSeconds: 20 readinessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 10 resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: users mountPath: /etc/audiomanager/users.yaml subPath: {{ .Values.users.key }} readOnly: true - name: data mountPath: /data - name: tmp mountPath: /tmp volumes: - name: users secret: secretName: {{ required "users.existingSecret is required" .Values.users.existingSecret }} - name: data {{- if .Values.data.persistence.enabled }} persistentVolumeClaim: claimName: {{ include "audiomanager.fullname" . }}-data {{- else }} emptyDir: {} {{- end }} - name: tmp emptyDir: {} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}