From b512d711922d22fc3b6104489784d9e8e78036cc Mon Sep 17 00:00:00 2001 From: Ludovic Ortega Date: Sun, 23 Jun 2024 23:07:38 +0000 Subject: [PATCH] feat: allow to disable config PVC in postgres setup for radarr/bazarr/sonarr/prowlarr Signed-off-by: Ludovic Ortega --- charts/bazarr/Chart.yaml | 2 +- charts/bazarr/README.md | 4 ++-- charts/bazarr/templates/deployment.yaml | 8 ++++++++ charts/bazarr/templates/persistentvolumeclaim.yaml | 4 +++- charts/bazarr/values.yaml | 1 + charts/prowlarr/Chart.yaml | 2 +- charts/prowlarr/README.md | 4 ++-- charts/prowlarr/templates/deployment.yaml | 4 ++++ charts/prowlarr/templates/persistentvolumeclaim.yaml | 4 +++- charts/prowlarr/values.yaml | 1 + charts/radarr/Chart.yaml | 4 ++-- charts/radarr/README.md | 4 ++-- charts/radarr/templates/deployment.yaml | 8 ++++++++ charts/radarr/templates/persistentvolumeclaim.yaml | 4 +++- charts/radarr/values.yaml | 1 + charts/sonarr/Chart.yaml | 2 +- charts/sonarr/README.md | 4 ++-- charts/sonarr/templates/deployment.yaml | 8 ++++++++ charts/sonarr/templates/persistentvolumeclaim.yaml | 4 +++- charts/sonarr/values.yaml | 1 + 20 files changed, 57 insertions(+), 17 deletions(-) diff --git a/charts/bazarr/Chart.yaml b/charts/bazarr/Chart.yaml index 4ed915f..c9b0360 100644 --- a/charts/bazarr/Chart.yaml +++ b/charts/bazarr/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0" name: bazarr description: bazarr helm chart for Kubernetes type: application -version: 0.3.2 +version: 0.4.0 # image: ghcr.io/onedr0p/bazarr appVersion: "1.4.3" maintainers: diff --git a/charts/bazarr/README.md b/charts/bazarr/README.md index 8ff7bb3..319b7b6 100644 --- a/charts/bazarr/README.md +++ b/charts/bazarr/README.md @@ -1,6 +1,6 @@ # bazarr -![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.3](https://img.shields.io/badge/AppVersion-1.4.3-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.4.3](https://img.shields.io/badge/AppVersion-1.4.3-informational?style=flat-square) bazarr helm chart for Kubernetes @@ -37,7 +37,7 @@ helm repo add adminafk https://helm-charts.adminafk.fr | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | +| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | | config.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes of persistent disk | | config.persistence.annotations | object | `{}` | Annotations for PVCs | | config.persistence.name | string | `""` | Config name | diff --git a/charts/bazarr/templates/deployment.yaml b/charts/bazarr/templates/deployment.yaml index 878c25c..2902102 100644 --- a/charts/bazarr/templates/deployment.yaml +++ b/charts/bazarr/templates/deployment.yaml @@ -64,19 +64,27 @@ spec: envFrom: {{- toYaml . | nindent 12 }} {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumeMounts }} volumeMounts: + {{- if .Values.config.persistence.enabled }} - name: config mountPath: /config + {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumes }} volumes: + {{- if .Values.config.persistence.enabled }} - name: config persistentVolumeClaim: claimName: {{ include "bazarr.configPersistenceName" . }} + {{- end }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/bazarr/templates/persistentvolumeclaim.yaml b/charts/bazarr/templates/persistentvolumeclaim.yaml index 81e5b90..3624a72 100644 --- a/charts/bazarr/templates/persistentvolumeclaim.yaml +++ b/charts/bazarr/templates/persistentvolumeclaim.yaml @@ -1,3 +1,4 @@ +{{- if .Values.config.persistence.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -17,4 +18,5 @@ spec: {{- end }} resources: requests: - storage: "{{ .Values.config.persistence.size }}" \ No newline at end of file + storage: "{{ .Values.config.persistence.size }}" +{{- end }} \ No newline at end of file diff --git a/charts/bazarr/values.yaml b/charts/bazarr/values.yaml index 9880861..e1d8640 100644 --- a/charts/bazarr/values.yaml +++ b/charts/bazarr/values.yaml @@ -59,6 +59,7 @@ service: # -- Creating PVC to store configuration config: persistence: + enabled: true # -- Size of persistent disk size: 5Gi # -- Annotations for PVCs diff --git a/charts/prowlarr/Chart.yaml b/charts/prowlarr/Chart.yaml index 12d4de3..5d0d9fc 100644 --- a/charts/prowlarr/Chart.yaml +++ b/charts/prowlarr/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0" name: prowlarr description: prowlarr helm chart for Kubernetes type: application -version: 0.3.2 +version: 0.4.0 # image: ghcr.io/onedr0p/prowlarr appVersion: "1.18.0" maintainers: diff --git a/charts/prowlarr/README.md b/charts/prowlarr/README.md index 69450d9..e172a23 100644 --- a/charts/prowlarr/README.md +++ b/charts/prowlarr/README.md @@ -1,6 +1,6 @@ # prowlarr -![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.18.0](https://img.shields.io/badge/AppVersion-1.18.0-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.18.0](https://img.shields.io/badge/AppVersion-1.18.0-informational?style=flat-square) prowlarr helm chart for Kubernetes @@ -37,7 +37,7 @@ helm repo add adminafk https://helm-charts.adminafk.fr | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | +| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | | config.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes of persistent disk | | config.persistence.annotations | object | `{}` | Annotations for PVCs | | config.persistence.name | string | `""` | Config name | diff --git a/charts/prowlarr/templates/deployment.yaml b/charts/prowlarr/templates/deployment.yaml index b1b5173..4dffdbd 100644 --- a/charts/prowlarr/templates/deployment.yaml +++ b/charts/prowlarr/templates/deployment.yaml @@ -64,13 +64,17 @@ spec: envFrom: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Values.config.persistence.enabled }} volumeMounts: - name: config mountPath: /config + {{- end }} + {{- if .Values.config.persistence.enabled }} volumes: - name: config persistentVolumeClaim: claimName: {{ include "prowlarr.configPersistenceName" . }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/prowlarr/templates/persistentvolumeclaim.yaml b/charts/prowlarr/templates/persistentvolumeclaim.yaml index 4c28de1..9f74d59 100644 --- a/charts/prowlarr/templates/persistentvolumeclaim.yaml +++ b/charts/prowlarr/templates/persistentvolumeclaim.yaml @@ -1,3 +1,4 @@ +{{- if .Values.config.persistence.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -17,4 +18,5 @@ spec: {{- end }} resources: requests: - storage: "{{ .Values.config.persistence.size }}" \ No newline at end of file + storage: "{{ .Values.config.persistence.size }}" +{{- end }} \ No newline at end of file diff --git a/charts/prowlarr/values.yaml b/charts/prowlarr/values.yaml index 4e3f5de..214cb4f 100644 --- a/charts/prowlarr/values.yaml +++ b/charts/prowlarr/values.yaml @@ -59,6 +59,7 @@ service: # -- Creating PVC to store configuration config: persistence: + enabled: true # -- Size of persistent disk size: 5Gi # -- Annotations for PVCs diff --git a/charts/radarr/Chart.yaml b/charts/radarr/Chart.yaml index 5528357..2dea145 100644 --- a/charts/radarr/Chart.yaml +++ b/charts/radarr/Chart.yaml @@ -3,9 +3,9 @@ kubeVersion: ">=1.23.0-0" name: radarr description: radarr helm chart for Kubernetes type: application -version: 0.3.1 +version: 0.4.0 # image: ghcr.io/onedr0p/radarr -appVersion: "5.6.0" +appVersion: "5.7.0" maintainers: - name: Ludovic Ortega email: ludovic.ortega@adminafk.fr diff --git a/charts/radarr/README.md b/charts/radarr/README.md index e026054..5527377 100644 --- a/charts/radarr/README.md +++ b/charts/radarr/README.md @@ -1,6 +1,6 @@ # radarr -![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.6.0](https://img.shields.io/badge/AppVersion-5.6.0-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 5.7.0](https://img.shields.io/badge/AppVersion-5.7.0-informational?style=flat-square) radarr helm chart for Kubernetes @@ -37,7 +37,7 @@ helm repo add adminafk https://helm-charts.adminafk.fr | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | +| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | | config.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes of persistent disk | | config.persistence.annotations | object | `{}` | Annotations for PVCs | | config.persistence.name | string | `""` | Config name | diff --git a/charts/radarr/templates/deployment.yaml b/charts/radarr/templates/deployment.yaml index a3ac6b5..d51412a 100644 --- a/charts/radarr/templates/deployment.yaml +++ b/charts/radarr/templates/deployment.yaml @@ -64,19 +64,27 @@ spec: envFrom: {{- toYaml . | nindent 12 }} {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumeMounts }} volumeMounts: + {{- if .Values.config.persistence.enabled }} - name: config mountPath: /config + {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumes }} volumes: + {{- if .Values.config.persistence.enabled }} - name: config persistentVolumeClaim: claimName: {{ include "radarr.configPersistenceName" . }} + {{- end }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/radarr/templates/persistentvolumeclaim.yaml b/charts/radarr/templates/persistentvolumeclaim.yaml index e187a7e..fb3a216 100644 --- a/charts/radarr/templates/persistentvolumeclaim.yaml +++ b/charts/radarr/templates/persistentvolumeclaim.yaml @@ -1,3 +1,4 @@ +{{- if .Values.config.persistence.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -17,4 +18,5 @@ spec: {{- end }} resources: requests: - storage: "{{ .Values.config.persistence.size }}" \ No newline at end of file + storage: "{{ .Values.config.persistence.size }}" +{{- end }} \ No newline at end of file diff --git a/charts/radarr/values.yaml b/charts/radarr/values.yaml index fd02c13..3f56239 100644 --- a/charts/radarr/values.yaml +++ b/charts/radarr/values.yaml @@ -59,6 +59,7 @@ service: # -- Creating PVC to store configuration config: persistence: + enabled: true # -- Size of persistent disk size: 5Gi # -- Annotations for PVCs diff --git a/charts/sonarr/Chart.yaml b/charts/sonarr/Chart.yaml index 3eb8a3d..31f0b90 100644 --- a/charts/sonarr/Chart.yaml +++ b/charts/sonarr/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0" name: sonarr description: sonarr helm chart for Kubernetes type: application -version: 0.3.2 +version: 0.4.0 # image: ghcr.io/onedr0p/sonarr appVersion: "4.0.5" maintainers: diff --git a/charts/sonarr/README.md b/charts/sonarr/README.md index e90f56e..a09acb7 100644 --- a/charts/sonarr/README.md +++ b/charts/sonarr/README.md @@ -1,6 +1,6 @@ # sonarr -![Version: 0.3.2](https://img.shields.io/badge/Version-0.3.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.5](https://img.shields.io/badge/AppVersion-4.0.5-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.0.5](https://img.shields.io/badge/AppVersion-4.0.5-informational?style=flat-square) sonarr helm chart for Kubernetes @@ -37,7 +37,7 @@ helm repo add adminafk https://helm-charts.adminafk.fr | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | +| config | object | `{"persistence":{"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"name":"","size":"5Gi","volumeName":""}}` | Creating PVC to store configuration | | config.persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes of persistent disk | | config.persistence.annotations | object | `{}` | Annotations for PVCs | | config.persistence.name | string | `""` | Config name | diff --git a/charts/sonarr/templates/deployment.yaml b/charts/sonarr/templates/deployment.yaml index 2ae8ad5..77a99eb 100644 --- a/charts/sonarr/templates/deployment.yaml +++ b/charts/sonarr/templates/deployment.yaml @@ -64,19 +64,27 @@ spec: envFrom: {{- toYaml . | nindent 12 }} {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumeMounts }} volumeMounts: + {{- if .Values.config.persistence.enabled }} - name: config mountPath: /config + {{- end }} {{- with .Values.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumes }} volumes: + {{- if .Values.config.persistence.enabled }} - name: config persistentVolumeClaim: claimName: {{ include "sonarr.configPersistenceName" . }} + {{- end }} {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/sonarr/templates/persistentvolumeclaim.yaml b/charts/sonarr/templates/persistentvolumeclaim.yaml index b718492..b3a5b96 100644 --- a/charts/sonarr/templates/persistentvolumeclaim.yaml +++ b/charts/sonarr/templates/persistentvolumeclaim.yaml @@ -1,3 +1,4 @@ +{{- if .Values.config.persistence.enabled -}} apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -17,4 +18,5 @@ spec: {{- end }} resources: requests: - storage: "{{ .Values.config.persistence.size }}" \ No newline at end of file + storage: "{{ .Values.config.persistence.size }}" +{{- end }} \ No newline at end of file diff --git a/charts/sonarr/values.yaml b/charts/sonarr/values.yaml index 7dfaed9..bd1f50a 100644 --- a/charts/sonarr/values.yaml +++ b/charts/sonarr/values.yaml @@ -59,6 +59,7 @@ service: # -- Creating PVC to store configuration config: persistence: + enabled: true # -- Size of persistent disk size: 5Gi # -- Annotations for PVCs