apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "ombi.fullname" . }} labels: {{- include "ombi.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "ombi.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "ombi.selectorLabels" . | nindent 8 }} spec: # Necessary for Pod to have a static hostname in order to expose ports: # https://docs.k8s-at-home.com/guides/pod-gateway/#exposing-routed-pod-ports-from-the-gateway hostname: omni {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: {{ if .Values.ombi.enabled }} - name: ombi securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: PUID value: "1000" - name: GUID value: "1000" - name: TZ value: "America/Los_Angeles" resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: ombi-config {{- end -}} {{ if .Values.sonarr.enabled }} - name: sonarr securityContext: {{- toYaml .Values.securityContext | nindent 12}} image: "lscr.io/linuxserver/sonarr:{{ .Values.sonarr.tag | default "latest" }}" env: - name: PUID value: "1000" - name: PGID value: "1000" resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: sonarr-config - mountPath: /data name: ombi-truenas-data {{- end -}} {{ if .Values.radarr.enabled }} - name: radarr securityContext: {{- toYaml .Values.securityContext | nindent 12}} image: "lscr.io/linuxserver/radarr:latest" env: - name: PUID value: "1000" - name: PGID value: "1000" resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: radarr-config - mountPath: /data name: ombi-truenas-data {{- end -}} {{ if .Values.readarr.enabled }} - name: readarr securityContext: {{- toYaml .Values.securityContext | nindent 12}} image: "lscr.io/linuxserver/readarr:develop" env: - name: PUID value: "1000" - name: PGID value: "1000" resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: readarr-config - mountPath: /data name: ombi-truenas-data {{- end -}} {{if .Values.prowlarr.enabled}} - name: prowlarr securityContext: {{- toYaml .Values.securityContext | nindent 12}} image: "lscr.io/linuxserver/prowlarr:latest" env: - name: PUID value: "1000" - name: PGID value: "1000" resources: {{- toYaml .Values.resources | nindent 12}} volumeMounts: - mountPath: /config name: prowlarr-config - mountPath: /data name: ombi-truenas-data {{- end -}} {{ if .Values.nzbget.enabled }} - name: nzbget securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "lscr.io/linuxserver/nzbget:latest" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: PUID value: "1000" - name: PGID value: "1000" - name: TZ value: "America/Los_Angeles" - name: NZBGET_USER value: nzbget - name: NZBGET_PASS valueFrom: secretKeyRef: name: nzbget-creds key: password optional: false resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: nzbget-config - mountPath: /data/usenet name: usenet-truenas-downloads {{ end }} {{ if .Values.sabnzbd.enabled }} - name: sabnzbd securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "lscr.io/linuxserver/sabnzbd:latest" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - name: PUID value: "1000" - name: PGID value: "1000" - name: TZ value: "America/Los_Angeles" resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /config name: sabnzbd-config - mountPath: /data/usenet name: usenet-truenas-downloads {{ end }} volumes: - name: ombi-config persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-ombi-config-pvc - name: ombi-data persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-data-pvc - name: ombi-truenas-data persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-truenas-data-pvc - name: sonarr-config persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-sonarr-config-pvc - name: radarr-config persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-radarr-config-pvc - name: readarr-config persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-readarr-config-pvc - name: prowlarr-config persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-prowlarr-config-pvc - name: whisparr-config persistentVolumeClaim: claimName: ombi-whisparr-config-pvc - name: nzbget-config persistentVolumeClaim: claimName: {{include "ombi.fullname" .}}-nzbget-config-pvc - name: sabnzbd-config persistentVolumeClaim: claimName: {{include "ombi.fullname" .}}-sabnzbd-config-pvc - name: usenet-truenas-downloads persistentVolumeClaim: claimName: {{ include "ombi.fullname" . }}-truenas-usenet-downloads-pvc {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}