瀏覽代碼

fix permission on ixVolumes on initial install, when acls are not enabled (#1882)

* elastic search

* prometheus

* bazarr

* briefkasten

* jellyfin

* lidarr

* prowlarr

* qbit

* radarr

* readarr

* sonarr

* bump
Stavros Kois 1 年之前
父節點
當前提交
7a03a1ed61
共有 24 個文件被更改,包括 169 次插入160 次删除
  1. 1 1
      library/ix-dev/charts/elastic-search/Chart.yaml
  2. 15 12
      library/ix-dev/charts/elastic-search/templates/_es.tpl
  3. 1 1
      library/ix-dev/charts/prometheus/Chart.yaml
  4. 19 13
      library/ix-dev/charts/prometheus/templates/_prometheus.tpl
  5. 1 1
      library/ix-dev/community/bazarr/Chart.yaml
  6. 6 0
      library/ix-dev/community/bazarr/templates/_bazarr.tpl
  7. 9 12
      library/ix-dev/community/bazarr/templates/_persistence.tpl
  8. 1 1
      library/ix-dev/community/briefkasten/Chart.yaml
  9. 1 14
      library/ix-dev/community/briefkasten/templates/_persistence.tpl
  10. 1 1
      library/ix-dev/community/jellyfin/Chart.yaml
  11. 25 21
      library/ix-dev/community/jellyfin/templates/_jellyfin.tpl
  12. 1 1
      library/ix-dev/community/lidarr/Chart.yaml
  13. 15 12
      library/ix-dev/community/lidarr/templates/_lidarr.tpl
  14. 1 1
      library/ix-dev/community/prowlarr/Chart.yaml
  15. 9 12
      library/ix-dev/community/prowlarr/templates/_persistence.tpl
  16. 6 0
      library/ix-dev/community/prowlarr/templates/_prowlarr.tpl
  17. 1 1
      library/ix-dev/community/qbittorrent/Chart.yaml
  18. 20 14
      library/ix-dev/community/qbittorrent/templates/_qbittorrent.tpl
  19. 1 1
      library/ix-dev/community/radarr/Chart.yaml
  20. 15 12
      library/ix-dev/community/radarr/templates/_radarr.tpl
  21. 1 1
      library/ix-dev/community/readarr/Chart.yaml
  22. 3 14
      library/ix-dev/community/readarr/templates/_persistence.tpl
  23. 1 1
      library/ix-dev/community/sonarr/Chart.yaml
  24. 15 13
      library/ix-dev/community/sonarr/templates/_sonarr.tpl

+ 1 - 1
library/ix-dev/charts/elastic-search/Chart.yaml

@@ -4,7 +4,7 @@ description: Elasticsearch is the distributed, RESTful search and analytics engi
 annotations:
   title: Elastic Search
 type: application
-version: 1.1.3
+version: 1.1.4
 apiVersion: v2
 appVersion: 8.11.3
 kubeVersion: '>=1.16.0-0'

+ 15 - 12
library/ix-dev/charts/elastic-search/templates/_es.tpl

@@ -60,6 +60,12 @@ workload:
               port: {{ .Values.esNetwork.httpPort }}
               httpHeaders:
                 Authorization: Basic {{ printf "elastic:%s" .Values.esConfig.password | b64enc }}
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.esRunAs.user
+                                                        "GID" .Values.esRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{/* Service */}}
 service:
   es:
@@ -79,22 +85,29 @@ service:
 persistence:
   data:
     enabled: true
-    {{- include "es.storage.ci.migration" (dict "storage" .Values.esStorage.data) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.esStorage.data) | nindent 4 }}
     targetSelector:
       es:
         es:
           mountPath: /usr/share/elasticsearch/data
+        {{- if and (eq .Values.esStorage.data.type "ixVolume")
+                  (not (.Values.esStorage.data.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/data
+        {{- end }}
 
   {{- range $idx, $storage := .Values.esStorage.additionalStorages }}
   {{ printf "es-%v:" (int $idx) }}
     enabled: true
-    {{- include "es.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       es:
         es:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 
   {{- if .Values.esNetwork.certificateID }}
@@ -122,13 +135,3 @@ scaleCertificate:
     id: {{ .Values.esNetwork.certificateID }}
     {{- end -}}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.1.0+ */}}
-{{- define "es.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/charts/prometheus/Chart.yaml

@@ -3,7 +3,7 @@ description: The Prometheus monitoring system and time series database.
 annotations:
   title: Prometheus
 type: application
-version: 1.1.2
+version: 1.1.3
 apiVersion: v2
 appVersion: v2.48.1
 kubeVersion: '>=1.16.0-0'

+ 19 - 13
library/ix-dev/charts/prometheus/templates/_prometheus.tpl

@@ -54,6 +54,11 @@ workload:
               port: {{ .Values.prometheusNetwork.apiPort }}
               path: /-/ready
       initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.prometheusRunAs.user
+                                                        "GID" .Values.prometheusRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
         init-config:
           enabled: true
           type: init
@@ -91,15 +96,18 @@ service:
 persistence:
   data:
     enabled: true
-    {{- include "prometheus.storage.ci.migration" (dict "storage" .Values.prometheusStorage.data) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.prometheusStorage.data) | nindent 4 }}
     targetSelector:
       prometheus:
         prometheus:
           mountPath: /data
+        {{- if and (eq .Values.prometheusStorage.data.type "ixVolume")
+                  (not (.Values.prometheusStorage.data.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/data
+        {{- end }}
   config:
     enabled: true
-    {{- include "prometheus.storage.ci.migration" (dict "storage" .Values.prometheusStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.prometheusStorage.config) | nindent 4 }}
     targetSelector:
       prometheus:
@@ -107,24 +115,22 @@ persistence:
           mountPath: /config
         init-config:
           mountPath: /config
+        {{- if and (eq .Values.prometheusStorage.config.type "ixVolume")
+                  (not (.Values.prometheusStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   {{- range $idx, $storage := .Values.prometheusStorage.additionalStorages }}
   {{ printf "prometheus-%v:" (int $idx) }}
     enabled: true
-    {{- include "prometheus.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       prometheus:
         prometheus:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.1.0+ */}}
-{{- define "prometheus.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/bazarr/Chart.yaml

@@ -3,7 +3,7 @@ description: Bazarr is a companion application to Sonarr and Radarr. It manages
 annotations:
   title: Bazarr
 type: application
-version: 1.2.2
+version: 1.2.3
 apiVersion: v2
 appVersion: 1.4.0
 kubeVersion: '>=1.16.0-0'

+ 6 - 0
library/ix-dev/community/bazarr/templates/_bazarr.tpl

@@ -42,4 +42,10 @@ workload:
               type: http
               port: "{{ .Values.bazarrNetwork.webPort }}"
               path: /api/swagger.json
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.bazarrRunAs.user
+                                                        "GID" .Values.bazarrRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{- end -}}

+ 9 - 12
library/ix-dev/community/bazarr/templates/_persistence.tpl

@@ -2,12 +2,16 @@
 persistence:
   config:
     enabled: true
-    {{- include "bazarr.storage.ci.migration" (dict "storage" .Values.bazarrStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.bazarrStorage.config) | nindent 4 }}
     targetSelector:
       bazarr:
         bazarr:
           mountPath: /config
+        {{- if and (eq .Values.bazarrStorage.config.type "ixVolume")
+                  (not (.Values.bazarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -18,21 +22,14 @@ persistence:
   {{- range $idx, $storage := .Values.bazarrStorage.additionalStorages }}
   {{ printf "bazarr-%v:" (int $idx) }}
     enabled: true
-    {{- include "bazarr.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       bazarr:
         bazarr:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "bazarr.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/briefkasten/Chart.yaml

@@ -3,7 +3,7 @@ description: Briefkasten is a self hosted bookmarking app
 annotations:
   title: Briefkasten
 type: application
-version: 1.2.1
+version: 1.2.2
 apiVersion: v2
 appVersion: latest
 kubeVersion: '>=1.16.0-0'

+ 1 - 14
library/ix-dev/community/briefkasten/templates/_persistence.tpl

@@ -10,32 +10,19 @@ persistence:
   {{- range $idx, $storage := .Values.briefkastenStorage.additionalStorages }}
   {{ printf "briefkasten-%v:" (int $idx) }}
     enabled: true
-    {{- include "briefkasten.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       briefkasten:
         briefkasten:
           mountPath: {{ $storage.mountPath }}
-        {{- if eq $storage.type "ixVolume" }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
         01-permissions:
           mountPath: /mnt/directories{{ $storage.mountPath }}
         {{- end }}
   {{- end -}}
 
-  {{- include "briefkasten.storage.ci.migration" (dict "storage" .Values.briefkastenStorage.pgData) }}
-  {{- include "briefkasten.storage.ci.migration" (dict "storage" .Values.briefkastenStorage.pgBackup) }}
   {{- include "ix.v1.common.app.postgresPersistence"
       (dict "pgData" .Values.briefkastenStorage.pgData
             "pgBackup" .Values.briefkastenStorage.pgBackup
       ) | nindent 2 }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "briefkasten.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/jellyfin/Chart.yaml

@@ -4,7 +4,7 @@ description: Jellyfin is a Free Software Media System that puts you in control o
 annotations:
   title: Jellyfin
 type: application
-version: 1.2.1
+version: 1.2.2
 apiVersion: v2
 appVersion: 10.8.13
 kubeVersion: '>=1.16.0-0'

+ 25 - 21
library/ix-dev/community/jellyfin/templates/_jellyfin.tpl

@@ -41,7 +41,12 @@ workload:
               type: http
               port: 8096
               path: /health
-
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.jellyfinRunAs.user
+                                                        "GID" .Values.jellyfinRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{/* Service */}}
 service:
   jellyfin:
@@ -62,28 +67,40 @@ service:
 persistence:
   config:
     enabled: true
-    {{- include "jellyfin.storage.ci.migration" (dict "storage" .Values.jellyfinStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.jellyfinStorage.config) | nindent 4 }}
     targetSelector:
       jellyfin:
         jellyfin:
           mountPath: /config
+        {{- if and (eq .Values.jellyfinStorage.config.type "ixVolume")
+                  (not (.Values.jellyfinStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   cache:
     enabled: true
-    {{- include "jellyfin.storage.ci.migration" (dict "storage" .Values.jellyfinStorage.cache) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.jellyfinStorage.cache) | nindent 4 }}
     targetSelector:
       jellyfin:
         jellyfin:
           mountPath: /cache
+        {{- if and (eq .Values.jellyfinStorage.cache.type "ixVolume")
+                  (not (.Values.jellyfinStorage.cache.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/cache
+        {{- end }}
   transcode:
     enabled: true
-    {{- include "jellyfin.storage.ci.migration" (dict "storage" .Values.jellyfinStorage.transcodes) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.jellyfinStorage.transcodes) | nindent 4 }}
     targetSelector:
       jellyfin:
         jellyfin:
           mountPath: /config/transcodes
+        {{- if and (eq .Values.jellyfinStorage.transcodes.type "ixVolume")
+                  (not (.Values.jellyfinStorage.transcodes.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/transcodes
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -94,12 +111,15 @@ persistence:
   {{- range $idx, $storage := .Values.jellyfinStorage.additionalStorages }}
   {{ printf "jellyfin-%v:" (int $idx) }}
     enabled: true
-    {{- include "jellyfin.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       jellyfin:
         jellyfin:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 
 {{ with .Values.jellyfinGPU }}
@@ -113,19 +133,3 @@ scaleGPU:
   {{ end }}
 {{ end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "jellyfin.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-
-  {{- if (hasKey $storage "medium") -}}
-    {{- $_ := set $storage "emptyDirConfig" dict -}}
-    {{- $_ := set $storage.emptyDirConfig "medium" $storage.medium -}}
-    {{- $_ := set $storage.emptyDirConfig "size" 1 -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/lidarr/Chart.yaml

@@ -3,7 +3,7 @@ description: Lidarr is a music collection manager for Usenet and BitTorrent user
 annotations:
   title: Lidarr
 type: application
-version: 1.2.3
+version: 1.2.4
 apiVersion: v2
 appVersion: 2.0.7.3849
 kubeVersion: '>=1.16.0-0'

+ 15 - 12
library/ix-dev/community/lidarr/templates/_lidarr.tpl

@@ -40,6 +40,12 @@ workload:
               type: http
               port: "{{ .Values.lidarrNetwork.webPort }}"
               path: /ping
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.lidarrRunAs.user
+                                                        "GID" .Values.lidarrRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 
 {{/* Service */}}
 service:
@@ -60,12 +66,16 @@ service:
 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
+        {{- if and (eq .Values.lidarrStorage.config.type "ixVolume")
+                  (not (.Values.lidarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -76,21 +86,14 @@ persistence:
   {{- 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 }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- 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 -}}

+ 1 - 1
library/ix-dev/community/prowlarr/Chart.yaml

@@ -4,7 +4,7 @@ description: Prowlarr is an indexer manager/proxy to integrate with your various
 annotations:
   title: Prowlarr
 type: application
-version: 1.2.2
+version: 1.2.3
 apiVersion: v2
 appVersion: 1.11.1.4146
 kubeVersion: '>=1.16.0-0'

+ 9 - 12
library/ix-dev/community/prowlarr/templates/_persistence.tpl

@@ -2,12 +2,16 @@
 persistence:
   config:
     enabled: true
-    {{- include "prowlarr.storage.ci.migration" (dict "storage" .Values.prowlarrStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.prowlarrStorage.config) | nindent 4 }}
     targetSelector:
       prowlarr:
         prowlarr:
           mountPath: /config
+        {{- if and (eq .Values.prowlarrStorage.config.type "ixVolume")
+                  (not (.Values.prowlarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -18,21 +22,14 @@ persistence:
   {{- range $idx, $storage := .Values.prowlarrStorage.additionalStorages }}
   {{ printf "prowlarr-%v:" (int $idx) }}
     enabled: true
-    {{- include "prowlarr.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       prowlarr:
         prowlarr:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "prowlarr.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 6 - 0
library/ix-dev/community/prowlarr/templates/_prowlarr.tpl

@@ -40,4 +40,10 @@ workload:
               type: http
               port: "{{ .Values.prowlarrNetwork.webPort }}"
               path: /ping
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.prowlarrRunAs.user
+                                                        "GID" .Values.prowlarrRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{- end -}}

+ 1 - 1
library/ix-dev/community/qbittorrent/Chart.yaml

@@ -3,7 +3,7 @@ description: The qBittorrent project aims to provide an open-source software alt
 annotations:
   title: qBittorrent
 type: application
-version: 1.2.2
+version: 1.2.3
 apiVersion: v2
 appVersion: 4.6.2
 kubeVersion: '>=1.16.0-0'

+ 20 - 14
library/ix-dev/community/qbittorrent/templates/_qbittorrent.tpl

@@ -40,7 +40,12 @@ workload:
               type: http
               port: "{{ .Values.qbitNetwork.webPort }}"
               path: /
-
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.qbitRunAs.user
+                                                        "GID" .Values.qbitRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{/* Service */}}
 service:
   qbittorrent:
@@ -78,38 +83,39 @@ service:
 persistence:
   config:
     enabled: true
-    {{- include "qbit.storage.ci.migration" (dict "storage" .Values.qbitStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.qbitStorage.config) | nindent 4 }}
     targetSelector:
       qbittorrent:
         qbittorrent:
           mountPath: /config
+        {{- if and (eq .Values.qbitStorage.config.type "ixVolume")
+                  (not (.Values.qbitStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   downloads:
     enabled: true
-    {{- include "qbit.storage.ci.migration" (dict "storage" .Values.qbitStorage.downloads) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.qbitStorage.downloads) | nindent 4 }}
     targetSelector:
       qbittorrent:
         qbittorrent:
           mountPath: /downloads
+        {{- if and (eq .Values.qbitStorage.downloads.type "ixVolume")
+                  (not (.Values.qbitStorage.downloads.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/downloads
+        {{- end }}
   {{- range $idx, $storage := .Values.qbitStorage.additionalStorages }}
   {{ printf "qbittorrent-%v:" (int $idx) }}
     enabled: true
-    {{- include "qbit.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       qbittorrent:
         qbittorrent:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "qbit.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/radarr/Chart.yaml

@@ -3,7 +3,7 @@ description: Radarr is a movie collection manager for Usenet and BitTorrent user
 annotations:
   title: Radarr
 type: application
-version: 1.2.2
+version: 1.2.3
 apiVersion: v2
 appVersion: 5.1.3.8246
 kubeVersion: '>=1.16.0-0'

+ 15 - 12
library/ix-dev/community/radarr/templates/_radarr.tpl

@@ -40,6 +40,12 @@ workload:
               type: http
               port: "{{ .Values.radarrNetwork.webPort }}"
               path: /ping
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.radarrRunAs.user
+                                                        "GID" .Values.radarrRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 
 {{/* Service */}}
 service:
@@ -60,12 +66,16 @@ service:
 persistence:
   config:
     enabled: true
-    {{- include "radarr.storage.ci.migration" (dict "storage" .Values.radarrStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.radarrStorage.config) | nindent 4 }}
     targetSelector:
       radarr:
         radarr:
           mountPath: /config
+        {{- if and (eq .Values.radarrStorage.config.type "ixVolume")
+                  (not (.Values.radarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -76,21 +86,14 @@ persistence:
   {{- range $idx, $storage := .Values.radarrStorage.additionalStorages }}
   {{ printf "radarr-%v:" (int $idx) }}
     enabled: true
-    {{- include "radarr.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       radarr:
         radarr:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "radarr.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/readarr/Chart.yaml

@@ -4,7 +4,7 @@ description: Readarr is an ebook and audiobook collection manager for Usenet and
 annotations:
   title: Readarr
 type: application
-version: 1.2.0
+version: 1.2.1
 apiVersion: v2
 appVersion: 0.3.11.2319
 kubeVersion: '>=1.16.0-0'

+ 3 - 14
library/ix-dev/community/readarr/templates/_persistence.tpl

@@ -2,13 +2,13 @@
 persistence:
   config:
     enabled: true
-    {{- include "readarr.storage.ci.migration" (dict "storage" .Values.readarrStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.readarrStorage.config) | nindent 4 }}
     targetSelector:
       readarr:
         readarr:
           mountPath: /config
-        {{- if eq .Values.readarrStorage.config.type "ixVolume" }}
+        {{- if and (eq .Values.readarrStorage.config.type "ixVolume")
+                  (not (.Values.readarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
         01-permissions:
           mountPath: /mnt/directories/config
         {{- end }}
@@ -22,25 +22,14 @@ persistence:
   {{- range $idx, $storage := .Values.readarrStorage.additionalStorages }}
   {{ printf "readarr-%v:" (int $idx) }}
     enabled: true
-    {{- include "readarr.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       readarr:
         readarr:
           mountPath: {{ $storage.mountPath }}
-        {{- if eq $storage.type "ixVolume" }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
         01-permissions:
           mountPath: /mnt/directories{{ $storage.mountPath }}
         {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "readarr.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}

+ 1 - 1
library/ix-dev/community/sonarr/Chart.yaml

@@ -3,7 +3,7 @@ description: Sonarr is a PVR for Usenet and BitTorrent users.
 annotations:
   title: Sonarr
 type: application
-version: 1.2.2
+version: 1.2.3
 apiVersion: v2
 appVersion: '3.0.10.1567'
 kubeVersion: '>=1.16.0-0'

+ 15 - 13
library/ix-dev/community/sonarr/templates/_sonarr.tpl

@@ -40,7 +40,12 @@ workload:
               type: http
               port: "{{ .Values.sonarrNetwork.webPort }}"
               path: /ping
-
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.sonarrRunAs.user
+                                                        "GID" .Values.sonarrRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
 {{/* Service */}}
 service:
   sonarr:
@@ -60,12 +65,16 @@ service:
 persistence:
   config:
     enabled: true
-    {{- include "sonarr.storage.ci.migration" (dict "storage" .Values.sonarrStorage.config) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.sonarrStorage.config) | nindent 4 }}
     targetSelector:
       sonarr:
         sonarr:
           mountPath: /config
+        {{- if and (eq .Values.sonarrStorage.config.type "ixVolume")
+                  (not (.Values.sonarrStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
   tmp:
     enabled: true
     type: emptyDir
@@ -76,21 +85,14 @@ persistence:
   {{- range $idx, $storage := .Values.sonarrStorage.additionalStorages }}
   {{ printf "sonarr-%v:" (int $idx) }}
     enabled: true
-    {{- include "sonarr.storage.ci.migration" (dict "storage" $storage) }}
     {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
     targetSelector:
       sonarr:
         sonarr:
           mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
   {{- end }}
 {{- end -}}
-
-{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
-{{- define "sonarr.storage.ci.migration" -}}
-  {{- $storage := .storage -}}
-
-  {{- if $storage.hostPath -}}
-    {{- $_ := set $storage "hostPathConfig" dict -}}
-    {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
-  {{- end -}}
-{{- end -}}