_lidarr.tpl 3.0 KB

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