_lidarr.tpl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {{- define "lidarr.workload" -}}
  2. workload:
  3. lidarr:
  4. enabled: true
  5. primary: true
  6. type: Deployment
  7. podSpec:
  8. hostNetwork: {{ .Values.lidarrNetwork.hostNetwork }}
  9. containers:
  10. lidarr:
  11. enabled: true
  12. primary: true
  13. imageSelector: image
  14. securityContext:
  15. runAsUser: {{ .Values.lidarrRunAs.user }}
  16. runAsGroup: {{ .Values.lidarrRunAs.group }}
  17. env:
  18. LIDARR__PORT: {{ .Values.lidarrNetwork.webPort }}
  19. LIDARR__INSTANCE_NAME: {{ .Values.lidarrConfig.instanceName }}
  20. {{ with .Values.lidarrConfig.additionalEnvs }}
  21. {{ range $env := . }}
  22. {{ $env.name }}: {{ $env.value }}
  23. {{ end }}
  24. {{ end }}
  25. probes:
  26. liveness:
  27. enabled: true
  28. type: http
  29. port: "{{ .Values.lidarrNetwork.webPort }}"
  30. path: /ping
  31. readiness:
  32. enabled: true
  33. type: http
  34. port: "{{ .Values.lidarrNetwork.webPort }}"
  35. path: /ping
  36. startup:
  37. enabled: true
  38. type: http
  39. port: "{{ .Values.lidarrNetwork.webPort }}"
  40. path: /ping
  41. initContainers:
  42. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  43. "UID" .Values.lidarrRunAs.user
  44. "GID" .Values.lidarrRunAs.group
  45. "mode" "check"
  46. "type" "init") | nindent 8 }}
  47. {{/* Service */}}
  48. service:
  49. lidarr:
  50. enabled: true
  51. primary: true
  52. type: NodePort
  53. targetSelector: lidarr
  54. ports:
  55. webui:
  56. enabled: true
  57. primary: true
  58. port: {{ .Values.lidarrNetwork.webPort }}
  59. nodePort: {{ .Values.lidarrNetwork.webPort }}
  60. targetSelector: lidarr
  61. {{/* Persistence */}}
  62. persistence:
  63. config:
  64. enabled: true
  65. type: {{ .Values.lidarrStorage.config.type }}
  66. datasetName: {{ .Values.lidarrStorage.config.datasetName | default "" }}
  67. hostPath: {{ .Values.lidarrStorage.config.hostPath | default "" }}
  68. targetSelector:
  69. lidarr:
  70. lidarr:
  71. mountPath: /config
  72. 01-permissions:
  73. mountPath: /mnt/directories/config
  74. tmp:
  75. enabled: true
  76. type: emptyDir
  77. targetSelector:
  78. lidarr:
  79. lidarr:
  80. mountPath: /tmp
  81. {{- range $idx, $storage := .Values.lidarrStorage.additionalStorages }}
  82. {{ printf "lidarr-%v" (int $idx) }}:
  83. enabled: true
  84. type: {{ $storage.type }}
  85. datasetName: {{ $storage.datasetName | default "" }}
  86. hostPath: {{ $storage.hostPath | default "" }}
  87. targetSelector:
  88. lidarr:
  89. lidarr:
  90. mountPath: {{ $storage.mountPath }}
  91. 01-permissions:
  92. mountPath: /mnt/directories{{ $storage.mountPath }}
  93. {{- end }}
  94. {{- end -}}