_lidarr.tpl 2.8 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. 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. {{/* Service */}}
  44. service:
  45. lidarr:
  46. enabled: true
  47. primary: true
  48. type: NodePort
  49. targetSelector: lidarr
  50. ports:
  51. webui:
  52. enabled: true
  53. primary: true
  54. port: {{ .Values.lidarrNetwork.webPort }}
  55. nodePort: {{ .Values.lidarrNetwork.webPort }}
  56. targetSelector: lidarr
  57. {{/* Persistence */}}
  58. persistence:
  59. config:
  60. enabled: true
  61. {{- include "lidarr.storage.ci.migration" (dict "storage" .Values.lidarrStorage.config) }}
  62. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.lidarrStorage.config) | nindent 4 }}
  63. targetSelector:
  64. lidarr:
  65. lidarr:
  66. mountPath: /config
  67. tmp:
  68. enabled: true
  69. type: emptyDir
  70. targetSelector:
  71. lidarr:
  72. lidarr:
  73. mountPath: /tmp
  74. {{- range $idx, $storage := .Values.lidarrStorage.additionalStorages }}
  75. {{ printf "lidarr-%v:" (int $idx) }}
  76. enabled: true
  77. {{- include "lidarr.storage.ci.migration" (dict "storage" $storage) }}
  78. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  79. targetSelector:
  80. lidarr:
  81. lidarr:
  82. mountPath: {{ $storage.mountPath }}
  83. {{- end }}
  84. {{- end -}}
  85. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  86. {{- define "lidarr.storage.ci.migration" -}}
  87. {{- $storage := .storage -}}
  88. {{- if $storage.hostPath -}}
  89. {{- $_ := set $storage "hostPathConfig" dict -}}
  90. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  91. {{- end -}}
  92. {{- end -}}