diff --git a/charts/qbittorrent/Chart.yaml b/charts/qbittorrent/Chart.yaml index 138c381..88ba78f 100644 --- a/charts/qbittorrent/Chart.yaml +++ b/charts/qbittorrent/Chart.yaml @@ -3,7 +3,7 @@ kubeVersion: ">=1.23.0-0" name: qbittorrent description: qbittorrent helm chart for Kubernetes type: application -version: 0.4.4 +version: 0.4.5 # image: ghcr.io/onedr0p/qbittorrent appVersion: "4.6.5" maintainers: diff --git a/charts/qbittorrent/README.md b/charts/qbittorrent/README.md index 5dd0ece..e1f3a1a 100644 --- a/charts/qbittorrent/README.md +++ b/charts/qbittorrent/README.md @@ -1,6 +1,6 @@ # qbittorrent -![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.5](https://img.shields.io/badge/AppVersion-4.6.5-informational?style=flat-square) +![Version: 0.4.5](https://img.shields.io/badge/Version-0.4.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 4.6.5](https://img.shields.io/badge/AppVersion-4.6.5-informational?style=flat-square) qbittorrent 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/qbittorrent/templates/deployment.yaml b/charts/qbittorrent/templates/deployment.yaml index 07b730c..15b2c2a 100644 --- a/charts/qbittorrent/templates/deployment.yaml +++ b/charts/qbittorrent/templates/deployment.yaml @@ -66,12 +66,16 @@ 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 .Values.gluetun.enabled }} - name: gluten securityContext: @@ -107,13 +111,17 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} + {{- if or .Values.config.persistence.enabled .Values.volumes }} volumes: + {{- if .Values.config.persistence.enabled }} - name: config persistentVolumeClaim: claimName: {{ include "qbittorrent.configPersistenceName" . }} - {{- with .Values.volumes }} + {{- end }} + {{- with .Values.volumes }} {{- toYaml . | nindent 8 }} {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/qbittorrent/templates/persistentvolumeclaim.yaml b/charts/qbittorrent/templates/persistentvolumeclaim.yaml index f300dda..3ee5360 100644 --- a/charts/qbittorrent/templates/persistentvolumeclaim.yaml +++ b/charts/qbittorrent/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/qbittorrent/values.yaml b/charts/qbittorrent/values.yaml index 7e9bb5e..7ff7808 100644 --- a/charts/qbittorrent/values.yaml +++ b/charts/qbittorrent/values.yaml @@ -67,6 +67,7 @@ service: # -- Creating PVC to store configuration config: persistence: + enabled: true # -- Size of persistent disk size: 5Gi # -- Annotations for PVCs