123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- {{- define "lidarr.workload" -}}
- workload:
- lidarr:
- enabled: true
- primary: true
- type: Deployment
- podSpec:
- hostNetwork: {{ .Values.lidarrNetwork.hostNetwork }}
- containers:
- lidarr:
- enabled: true
- primary: true
- imageSelector: image
- securityContext:
- runAsUser: {{ .Values.lidarrRunAs.user }}
- runAsGroup: {{ .Values.lidarrRunAs.group }}
- env:
- LIDARR__PORT: {{ .Values.lidarrNetwork.webPort }}
- LIDARR__INSTANCE_NAME: {{ .Values.lidarrConfig.instanceName }}
- {{ with .Values.lidarrConfig.additionalEnvs }}
- envList:
- {{ range $env := . }}
- - name: {{ $env.name }}
- value: {{ $env.value }}
- {{ end }}
- {{ end }}
- probes:
- liveness:
- enabled: true
- type: http
- port: "{{ .Values.lidarrNetwork.webPort }}"
- path: /ping
- readiness:
- enabled: true
- type: http
- port: "{{ .Values.lidarrNetwork.webPort }}"
- path: /ping
- startup:
- enabled: true
- type: http
- port: "{{ .Values.lidarrNetwork.webPort }}"
- path: /ping
- {{/* Service */}}
- service:
- lidarr:
- enabled: true
- primary: true
- type: NodePort
- targetSelector: lidarr
- ports:
- webui:
- enabled: true
- primary: true
- port: {{ .Values.lidarrNetwork.webPort }}
- nodePort: {{ .Values.lidarrNetwork.webPort }}
- targetSelector: lidarr
- {{/* Persistence */}}
- persistence:
- config:
- enabled: true
- {{- include "lidarr.storage.ci.migration" (dict "storage" .Values.lidarrStorage.config) }}
- {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.lidarrStorage.config) | nindent 4 }}
- targetSelector:
- lidarr:
- lidarr:
- mountPath: /config
- tmp:
- enabled: true
- type: emptyDir
- targetSelector:
- lidarr:
- lidarr:
- mountPath: /tmp
- {{- range $idx, $storage := .Values.lidarrStorage.additionalStorages }}
- {{ printf "lidarr-%v:" (int $idx) }}
- enabled: true
- {{- include "lidarr.storage.ci.migration" (dict "storage" $storage) }}
- {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
- targetSelector:
- lidarr:
- lidarr:
- mountPath: {{ $storage.mountPath }}
- {{- end }}
- {{- end -}}
- {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
- {{- define "lidarr.storage.ci.migration" -}}
- {{- $storage := .storage -}}
- {{- if $storage.hostPath -}}
- {{- $_ := set $storage "hostPathConfig" dict -}}
- {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
- {{- end -}}
- {{- end -}}
|