Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow to disable qbittorrent persistence #73

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/qbittorrent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions charts/qbittorrent/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 |
Expand Down
10 changes: 9 additions & 1 deletion charts/qbittorrent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 3 additions & 1 deletion charts/qbittorrent/templates/persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.config.persistence.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -17,4 +18,5 @@ spec:
{{- end }}
resources:
requests:
storage: "{{ .Values.config.persistence.size }}"
storage: "{{ .Values.config.persistence.size }}"
{{- end }}
1 change: 1 addition & 0 deletions charts/qbittorrent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ service:
# -- Creating PVC to store configuration
config:
persistence:
enabled: true
# -- Size of persistent disk
size: 5Gi
# -- Annotations for PVCs
Expand Down