_lidarr.tpl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. envList:
  22. {{ range $env := . }}
  23. - name: {{ $env.name }}
  24. value: {{ $env.value }}
  25. {{ end }}
  26. {{ end }}
  27. probes:
  28. liveness:
  29. enabled: true
  30. type: http
  31. port: "{{ .Values.lidarrNetwork.webPort }}"
  32. path: /ping
  33. readiness:
  34. enabled: true
  35. type: http
  36. port: "{{ .Values.lidarrNetwork.webPort }}"
  37. path: /ping
  38. startup:
  39. enabled: true
  40. type: http
  41. port: "{{ .Values.lidarrNetwork.webPort }}"
  42. path: /ping
  43. initContainers:
  44. {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
  45. "UID" .Values.lidarrRunAs.user
  46. "GID" .Values.lidarrRunAs.group
  47. "mode" "check"
  48. "type" "init") | nindent 8 }}
  49. {{/* Service */}}
  50. service:
  51. lidarr:
  52. enabled: true
  53. primary: true
  54. type: NodePort
  55. targetSelector: lidarr
  56. ports:
  57. webui:
  58. enabled: true
  59. primary: true
  60. port: {{ .Values.lidarrNetwork.webPort }}
  61. nodePort: {{ .Values.lidarrNetwork.webPort }}
  62. targetSelector: lidarr
  63. {{/* Persistence */}}
  64. persistence:
  65. config:
  66. enabled: true
  67. type: {{ .Values.lidarrStorage.config.type }}
  68. datasetName: {{ .Values.lidarrStorage.config.datasetName | default "" }}
  69. hostPath: {{ .Values.lidarrStorage.config.hostPath | default "" }}
  70. targetSelector:
  71. lidarr:
  72. lidarr:
  73. mountPath: /config
  74. 01-permissions:
  75. mountPath: /mnt/directories/config
  76. tmp:
  77. enabled: true
  78. type: emptyDir
  79. targetSelector:
  80. lidarr:
  81. lidarr:
  82. mountPath: /tmp
  83. {{- range $idx, $storage := .Values.lidarrStorage.additionalStorages }}
  84. {{ printf "lidarr-%v" (int $idx) }}:
  85. {{- $size := "" -}}
  86. {{- if $storage.size -}}
  87. {{- $size = (printf "%vGi" $storage.size) -}}
  88. {{- end }}
  89. enabled: true
  90. type: {{ $storage.type }}
  91. datasetName: {{ $storage.datasetName | default "" }}
  92. hostPath: {{ $storage.hostPath | default "" }}
  93. server: {{ $storage.server | default "" }}
  94. share: {{ $storage.share | default "" }}
  95. domain: {{ $storage.domain | default "" }}
  96. username: {{ $storage.username | default "" }}
  97. password: {{ $storage.password | default "" }}
  98. size: {{ $size }}
  99. {{- if eq $storage.type "smb-pv-pvc" }}
  100. mountOptions:
  101. - key: noperm
  102. {{- end }}
  103. targetSelector:
  104. lidarr:
  105. lidarr:
  106. mountPath: {{ $storage.mountPath }}
  107. 01-permissions:
  108. mountPath: /mnt/directories{{ $storage.mountPath }}
  109. {{- end }}
  110. {{- end -}}