mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-02-03 07:49:03 +00:00
[Lidarr][Change] Merge downloads and music PVCs (#227)
* Merge music and downloads into single PVC Signed-off-by: Thomas John Wesolowski <wojoinc@gmail.com> * Add upgrading section to README Signed-off-by: Thomas John Wesolowski <wojoinc@gmail.com>
This commit is contained in:
parent
831541d4a8
commit
a80fa0d800
@ -2,7 +2,7 @@ apiVersion: v1
|
|||||||
appVersion: 0.7.1.1381-ls7
|
appVersion: 0.7.1.1381-ls7
|
||||||
description: Looks and smells like Sonarr but made for music.
|
description: Looks and smells like Sonarr but made for music.
|
||||||
name: lidarr
|
name: lidarr
|
||||||
version: 1.0.1
|
version: 2.0.0
|
||||||
keywords:
|
keywords:
|
||||||
- lidarr
|
- lidarr
|
||||||
- usenet
|
- usenet
|
||||||
|
@ -17,6 +17,19 @@ To install the chart with the release name `my-release`:
|
|||||||
helm install --name my-release billimek/lidarr
|
helm install --name my-release billimek/lidarr
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
Chart versions 1.0.1 and earlier used separate PVCs for Downloads and Music. This presented an issue where Lidarr would be unable to hard-link files between the /downloads and /music directories when importing media. This is caused because each PVC is exposed to the pod as a separate filesystem. This resulted in Lidarr copying files rather than linking; using additional storage without the user's knowledge.
|
||||||
|
|
||||||
|
This chart now uses a single PVC for Downloads and Music. This means all of your media (and downloads) must be in, or be subdirectories of, a single directory. If upgrading from an earlier version of the chart, do the following:
|
||||||
|
|
||||||
|
1. [Uninstall](#uninstalling-the-chart) your current release
|
||||||
|
2. On your backing store, organize your media, ie. media/music, media/downloads
|
||||||
|
3. If using a pre-existing PVC, create a single new PVC for all of your media
|
||||||
|
4. Refer to the [configuration](#configuration) for updates to the chart values
|
||||||
|
5. Re-install the chart
|
||||||
|
6. Update your settings in the app to point to the new PVC, which is mounted at /media. This can be done using Lidarr's `Mass Editor` under the `Library` tab. Simply select all artists in your library, and use the editor to change the `Root Folder` and hit save.
|
||||||
|
|
||||||
## Uninstalling the Chart
|
## Uninstalling the Chart
|
||||||
|
|
||||||
To uninstall/delete the `my-release` deployment:
|
To uninstall/delete the `my-release` deployment:
|
||||||
@ -64,18 +77,12 @@ The following tables lists the configurable parameters of the Sentry chart and t
|
|||||||
| `persistence.config.storageClass` | Type of persistent volume claim | `-` |
|
| `persistence.config.storageClass` | Type of persistent volume claim | `-` |
|
||||||
| `persistence.config.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
| `persistence.config.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
||||||
| `persistence.config.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
|
| `persistence.config.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
|
||||||
| `persistence.downloads.enabled` | Use persistent volume to store configuration data | `true` |
|
| `persistence.media.enabled` | Use persistent volume to store configuration data | `true` |
|
||||||
| `persistence.downloads.size` | Size of persistent volume claim | `10Gi` |
|
| `persistence.media.size` | Size of persistent volume claim | `10Gi` |
|
||||||
| `persistence.downloads.existingClaim`| Use an existing PVC to persist data | `nil` |
|
| `persistence.media.existingClaim`| Use an existing PVC to persist data | `nil` |
|
||||||
| `persistence.downloads.storageClass` | Type of persistent volume claim | `-` |
|
| `persistence.media.storageClass` | Type of persistent volume claim | `-` |
|
||||||
| `persistence.downloads.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
| `persistence.media.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
||||||
| `persistence.downloads.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
|
| `persistence.media.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
|
||||||
| `persistence.music.enabled` | Use persistent volume to store configuration data | `true` |
|
|
||||||
| `persistence.music.size` | Size of persistent volume claim | `10Gi` |
|
|
||||||
| `persistence.music.existingClaim`| Use an existing PVC to persist data | `nil` |
|
|
||||||
| `persistence.music.storageClass` | Type of persistent volume claim | `-` |
|
|
||||||
| `persistence.music.accessMode` | Persistence access mode | `ReadWriteOnce` |
|
|
||||||
| `persistence.music.skipuninstall` | Do not delete the pvc upon helm uninstall | `false` |
|
|
||||||
| `persistence.extraExistingClaimMounts` | Optionally add multiple existing claims | `[]` |
|
| `persistence.extraExistingClaimMounts` | Optionally add multiple existing claims | `[]` |
|
||||||
| `resources` | CPU/Memory resource requests/limits | `{}` |
|
| `resources` | CPU/Memory resource requests/limits | `{}` |
|
||||||
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
| `nodeSelector` | Node labels for pod assignment | `{}` |
|
||||||
|
@ -64,15 +64,10 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /config
|
- mountPath: /config
|
||||||
name: config
|
name: config
|
||||||
- mountPath: /downloads
|
- mountPath: /media
|
||||||
name: downloads
|
name: media
|
||||||
{{- if .Values.persistence.downloads.subPath }}
|
{{- if .Values.persistence.media.subPath }}
|
||||||
subPath: {{ .Values.persistence.downloads.subPath }}
|
subPath: {{ .Values.persistence.media.subPath }}
|
||||||
{{- end }}
|
|
||||||
- mountPath: /music
|
|
||||||
name: music
|
|
||||||
{{- if .Values.persistence.music.subPath }}
|
|
||||||
subPath: {{ .Values.persistence.music.subPath }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Values.persistence.extraExistingClaimMounts }}
|
{{- range .Values.persistence.extraExistingClaimMounts }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
@ -89,17 +84,10 @@ spec:
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: downloads
|
- name: media
|
||||||
{{- if .Values.persistence.downloads.enabled }}
|
{{- if .Values.persistence.media.enabled }}
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ if .Values.persistence.downloads.existingClaim }}{{ .Values.persistence.downloads.existingClaim }}{{- else }}{{ template "lidarr.fullname" . }}-downloads{{- end }}
|
claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "lidarr.fullname" . }}-media{{- end }}
|
||||||
{{- else }}
|
|
||||||
emptyDir: {}
|
|
||||||
{{- end }}
|
|
||||||
- name: music
|
|
||||||
{{- if .Values.persistence.music.enabled }}
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: {{ if .Values.persistence.music.existingClaim }}{{ .Values.persistence.music.existingClaim }}{{- else }}{{ template "lidarr.fullname" . }}-music{{- end }}
|
|
||||||
{{- else }}
|
{{- else }}
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
{{- if and .Values.persistence.downloads.enabled (not .Values.persistence.downloads.existingClaim) }}
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: {{ template "lidarr.fullname" . }}-downloads
|
|
||||||
{{- if .Values.persistence.downloads.skipuninstall }}
|
|
||||||
annotations:
|
|
||||||
"helm.sh/resource-policy": keep
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: {{ include "lidarr.name" . }}
|
|
||||||
helm.sh/chart: {{ include "lidarr.chart" . }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- {{ .Values.persistence.downloads.accessMode | quote }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.downloads.size | quote }}
|
|
||||||
{{- if .Values.persistence.downloads.storageClass }}
|
|
||||||
{{- if (eq "-" .Values.persistence.downloads.storageClass) }}
|
|
||||||
storageClassName: ""
|
|
||||||
{{- else }}
|
|
||||||
storageClassName: "{{ .Values.persistence.downloads.storageClass }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
29
charts/lidarr/templates/media-pvc.yaml
Normal file
29
charts/lidarr/templates/media-pvc.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
{{- if and .Values.persistence.media.enabled (not .Values.persistence.media.existingClaim) }}
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ template "lidarr.fullname" . }}-media
|
||||||
|
{{- if .Values.persistence.media.skipuninstall }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/resource-policy": keep
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ include "lidarr.name" . }}
|
||||||
|
helm.sh/chart: {{ include "lidarr.chart" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.media.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.media.size | quote }}
|
||||||
|
{{- if .Values.persistence.media.storageClass }}
|
||||||
|
{{- if (eq "-" .Values.persistence.media.storageClass) }}
|
||||||
|
storageClassName: ""
|
||||||
|
{{- else }}
|
||||||
|
storageClassName: "{{ .Values.persistence.media.storageClass }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
{{- if and .Values.persistence.music.enabled (not .Values.persistence.music.existingClaim) }}
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: {{ template "lidarr.fullname" . }}-music
|
|
||||||
{{- if .Values.persistence.music.skipuninstall }}
|
|
||||||
annotations:
|
|
||||||
"helm.sh/resource-policy": keep
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: {{ include "lidarr.name" . }}
|
|
||||||
helm.sh/chart: {{ include "lidarr.chart" . }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- {{ .Values.persistence.music.accessMode | quote }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.music.size | quote }}
|
|
||||||
{{- if .Values.persistence.music.storageClass }}
|
|
||||||
{{- if (eq "-" .Values.persistence.music.storageClass) }}
|
|
||||||
storageClassName: ""
|
|
||||||
{{- else }}
|
|
||||||
storageClassName: "{{ .Values.persistence.music.storageClass }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
@ -81,28 +81,9 @@ persistence:
|
|||||||
size: 1Gi
|
size: 1Gi
|
||||||
## Do not delete the pvc upon helm uninstall
|
## Do not delete the pvc upon helm uninstall
|
||||||
skipuninstall: false
|
skipuninstall: false
|
||||||
downloads:
|
media:
|
||||||
enabled: true
|
enabled: true
|
||||||
## lidarr downloads volume configuration
|
## lidarr media volume configuration
|
||||||
## If defined, storageClassName: <storageClass>
|
|
||||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
|
||||||
## If undefined (the default) or set to null, no storageClassName spec is
|
|
||||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
|
||||||
## GKE, AWS & OpenStack)
|
|
||||||
##
|
|
||||||
# storageClass: "-"
|
|
||||||
##
|
|
||||||
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
|
||||||
## the existingClaim variable
|
|
||||||
# existingClaim: your-claim
|
|
||||||
# subPath: some-subpath
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
## Do not delete the pvc upon helm uninstall
|
|
||||||
skipuninstall: false
|
|
||||||
music:
|
|
||||||
enabled: true
|
|
||||||
## Directory where music are persisted
|
|
||||||
## If defined, storageClassName: <storageClass>
|
## If defined, storageClassName: <storageClass>
|
||||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
## If undefined (the default) or set to null, no storageClassName spec is
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
Loading…
Reference in New Issue
Block a user