mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
[qbittorrent] use common chart (#132)
This commit is contained in:
parent
55b0fb9c71
commit
e2bb17f069
@ -1,8 +1,8 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
appVersion: 4.2.5
|
appVersion: 4.3.0
|
||||||
description: qBittorrent is a cross-platform free and open-source BitTorrent client
|
description: qBittorrent is a cross-platform free and open-source BitTorrent client
|
||||||
name: qbittorrent
|
name: qbittorrent
|
||||||
version: 5.0.1
|
version: 6.0.0
|
||||||
keywords:
|
keywords:
|
||||||
- qbittorrent
|
- qbittorrent
|
||||||
- torrrent
|
- torrrent
|
||||||
@ -14,7 +14,6 @@ maintainers:
|
|||||||
- name: billimek
|
- name: billimek
|
||||||
email: jeff@billimek.com
|
email: jeff@billimek.com
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: media-common
|
- name: common
|
||||||
repository: https://k8s-at-home.com/charts/
|
repository: https://k8s-at-home.com/charts/
|
||||||
version: ^1.0.0
|
version: ^1.0.5
|
||||||
alias: qbittorrent
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# qBittorrent client
|
# qBittorrent
|
||||||
|
|
||||||
This is a helm chart for [qbittorrent](https://qbittorrent.org/) leveraging the [Linuxserver.io image](https://hub.docker.com/r/linuxserver/qbittorrent/)
|
This is a helm chart for [qbittorrent](https://qbittorrent.org/).
|
||||||
|
|
||||||
## TL;DR;
|
## TL;DR;
|
||||||
|
|
||||||
@ -32,27 +32,25 @@ helm delete my-release --purge
|
|||||||
|
|
||||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||||
|
|
||||||
## Configuration
|
Read through the charts [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/qbittorrent/values.yaml)
|
||||||
Read through the media-common [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/media-common/values.yaml)
|
|
||||||
file. It has several commented out suggested values.
|
file. It has several commented out suggested values.
|
||||||
|
Additionally you can take a look at the common library [values.yaml](https://github.com/k8s-at-home/charts/blob/master/charts/common/values.yaml) for more (advanced) configuration options.
|
||||||
|
|
||||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||||
```console
|
```console
|
||||||
helm install qbittorrent \
|
helm install my-release \
|
||||||
--set qbittorrent.env.TZ="America/New York" \
|
--set env.TZ="America/New York" \
|
||||||
k8s-at-home/qbittorrent
|
k8s-at-home/qbittorrent
|
||||||
```
|
```
|
||||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the
|
||||||
chart. For example,
|
chart. For example,
|
||||||
```console
|
```console
|
||||||
helm install qbittorrent k8s-at-home/qbittorrent --values values.yaml
|
helm install my-release k8s-at-home/qbittorrent --values values.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
These values will be nested as it is a dependency, for example
|
|
||||||
```yaml
|
```yaml
|
||||||
qbittorrent:
|
image:
|
||||||
image:
|
tag: ...
|
||||||
tag: ...
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -65,3 +63,18 @@ Error: rendered manifests contain a resource that already exists. Unable to cont
|
|||||||
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
|
it may be because you uninstalled the chart with `skipuninstall` enabled, you need to manually delete the pvc or use `existingClaim`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Upgrading an existing Release to a new major version
|
||||||
|
|
||||||
|
A major chart version change (like 4.0.1 -> 5.0.0) indicates that there is an incompatible breaking change potentially needing manual actions.
|
||||||
|
|
||||||
|
### Upgrading from 5.x.x to 6.x.x
|
||||||
|
|
||||||
|
Due to migrating to a centralized common library some values in `values.yaml` have changed.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* `service.port` has been moved to `service.port.port`.
|
||||||
|
* `persistence.type` has been moved to `controllerType`.
|
||||||
|
|
||||||
|
Refer to the library values.yaml for more configuration options.
|
||||||
|
@ -1,12 +1,2 @@
|
|||||||
qbittorrent:
|
ingress:
|
||||||
image:
|
enabled: true
|
||||||
organization: linuxserver
|
|
||||||
repository: qbittorrent
|
|
||||||
tag: 14.2.5.99202004250119-7015-2c65b79ubuntu18.04.1-ls91
|
|
||||||
|
|
||||||
service:
|
|
||||||
type: ClusterIP
|
|
||||||
port: 8080
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
enabled: false
|
|
||||||
|
@ -1,23 +1 @@
|
|||||||
{{- $svcPort := .Values.qbittorrent.service.port -}}
|
{{- include "common.notes.defaultNotes" . -}}
|
||||||
1. Get the application URL by running these commands:
|
|
||||||
{{- if .Values.qbittorrent.ingress.enabled }}
|
|
||||||
{{- range .Values.qbittorrent.ingress.hosts }}
|
|
||||||
http{{ if $.Values.qbittorrent.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.qbittorrent.ingress.path }}
|
|
||||||
{{- end }}
|
|
||||||
{{- else if contains "NodePort" .Values.qbittorrent.service.type }}
|
|
||||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "media-common.fullname" . }})
|
|
||||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
|
||||||
echo http://$NODE_IP:$NODE_PORT
|
|
||||||
{{- else if contains "LoadBalancer" .Values.qbittorrent.service.type }}
|
|
||||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
|
||||||
You can watch the status of by running 'kubectl get svc -w {{ include "media-common.fullname" . }}'
|
|
||||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "media-common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
|
||||||
echo http://$SERVICE_IP:{{ $svcPort }}
|
|
||||||
{{- else if contains "ClusterIP" .Values.qbittorrent.service.type }}
|
|
||||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "media-common.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
|
||||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
|
||||||
kubectl port-forward $POD_NAME 8080:{{ $svcPort }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
The default login to the GUI is login:admin, password:adminadmin
|
|
||||||
You should change this as soon as possible!
|
|
||||||
|
1
charts/qbittorrent/templates/common.yaml
Normal file
1
charts/qbittorrent/templates/common.yaml
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ include "common.all" . }}
|
@ -1,15 +1,15 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "media-common.fullname" . }}-scripts
|
name: {{ template "common.names.fullname" . }}-scripts
|
||||||
labels:
|
labels:
|
||||||
{{- include "media-common.labels" . | nindent 4 }}
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
{{- if and .Values.qbittorrent.btService .Values.qbittorrent.btService.port }}
|
{{- if and .Values.service.bittorrent .Values.service.bittorrent.port }}
|
||||||
31-update-port: |-
|
31-update-port: |-
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
QBITTORRENT_CONFIGFILE="/config/qBittorrent/qBittorrent.conf"
|
QBITTORRENT_CONFIGFILE="/config/qBittorrent/qBittorrent.conf"
|
||||||
INCOMING_PORT={{- .Values.qbittorrent.btService.port }}
|
INCOMING_PORT={{- .Values.service.bittorrent.port }}
|
||||||
|
|
||||||
incoming_port_exist=$(cat ${QBITTORRENT_CONFIGFILE} | grep -m 1 'Connection\\PortRangeMin='${INCOMING_PORT})
|
incoming_port_exist=$(cat ${QBITTORRENT_CONFIGFILE} | grep -m 1 'Connection\\PortRangeMin='${INCOMING_PORT})
|
||||||
if [[ -z "${incoming_port_exist}" ]]; then
|
if [[ -z "${incoming_port_exist}" ]]; then
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
{{- if and .Values.qbittorrent.persistence.downloads.enabled (not .Values.qbittorrent.persistence.downloads.existingClaim) }}
|
|
||||||
---
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: {{ template "media-common.fullname" . }}-downloads
|
|
||||||
{{- if .Values.qbittorrent.persistence.downloads.skipuninstall }}
|
|
||||||
annotations:
|
|
||||||
"helm.sh/resource-policy": keep
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
|
||||||
{{- include "media-common.labels" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- {{ .Values.qbittorrent.persistence.downloads.accessMode | quote }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.qbittorrent.persistence.downloads.size | quote }}
|
|
||||||
{{- if .Values.qbittorrent.persistence.downloads.storageClass }}
|
|
||||||
storageClassName: {{ if (eq "-" .Values.qbittorrent.persistence.downloads.storageClass) }}""{{- else }}{{ .Values.qbittorrent.persistence.downloads.storageClass | quote}}{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
@ -1,28 +1,28 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "media-common.fullname" . }}-bittorrent
|
name: {{ template "common.names.fullname" . }}-bittorrent
|
||||||
labels:
|
labels:
|
||||||
{{- include "media-common.labels" . | nindent 4 }}
|
{{- include "common.labels" . | nindent 4 }}
|
||||||
{{- if .Values.qbittorrent.btService.labels }}
|
{{- with .Values.service.bittorrent.labels }}
|
||||||
{{ toYaml .Values.qbittorrent.btService.labels | indent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.qbittorrent.btService.annotations }}
|
{{- with .Values.service.bittorrent.annotations }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- toYaml . | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
type: {{ .Values.qbittorrent.btService.type }}
|
type: {{ .Values.service.bittorrent.type }}
|
||||||
ports:
|
ports:
|
||||||
- name: bittorrent
|
- name: bittorrent
|
||||||
port: {{ .Values.qbittorrent.btService.port }}
|
port: {{ .Values.service.bittorrent.port }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: {{ .Values.qbittorrent.btService.port }}
|
targetPort: {{ .Values.service.bittorrent.port }}
|
||||||
{{- if (and (eq .Values.qbittorrent.btService.type "NodePort") (not (empty .Values.qbittorrent.btService.nodePort))) }}
|
{{- if (and (eq .Values.service.bittorrent.type "NodePort") (not (empty .Values.service.bittorrent.nodePort))) }}
|
||||||
nodePort: {{ .Values.qbittorrent.btService.nodePort }}
|
nodePort: {{ .Values.service.bittorrent.nodePort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.qbittorrent.btService.additionalSpec }}
|
{{- with .Values.service.bittorrent.additionalSpec }}
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "media-common.selectorLabels" . | nindent 4 }}
|
{{- include "common.labels.selectorLabels" . | nindent 4 }}
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
# Default values for qbittorrent.
|
# Default values for qbittorrent.
|
||||||
|
|
||||||
qbittorrent:
|
image:
|
||||||
image:
|
repository: linuxserver/qbittorrent
|
||||||
organization: linuxserver
|
pullPolicy: IfNotPresent
|
||||||
repository: qbittorrent
|
tag: version-4.3.0202010181232-7086-1c663adeeubuntu18.04.1
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: 14.2.5.99202004250119-7015-2c65b79ubuntu18.04.1-ls91
|
|
||||||
|
|
||||||
env:
|
env: {}
|
||||||
TZ: UTC
|
# TZ: UTC
|
||||||
PUID: "1001"
|
# PUID: 1001
|
||||||
PGID: "1001"
|
# PGID: 1001
|
||||||
UMASK: "022"
|
# UMASK: 022
|
||||||
|
|
||||||
service:
|
service:
|
||||||
|
port:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
btService:
|
bittorrent:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 6881
|
port: 6881
|
||||||
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
## Specify the nodePort value for the LoadBalancer and NodePort service types.
|
||||||
@ -31,36 +30,53 @@ qbittorrent:
|
|||||||
labels: {}
|
labels: {}
|
||||||
additionalSpec: {}
|
additionalSpec: {}
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
downloads:
|
config:
|
||||||
enabled: false
|
enabled: false
|
||||||
## qbittorrent downloads Persistent Volume Storage Class
|
emptyDir: false
|
||||||
## 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: "-"
|
|
||||||
# accessMode: ReadWriteOnce
|
|
||||||
# size: 1Gi
|
|
||||||
## Do not delete the pvc upon helm uninstall
|
|
||||||
# skipuninstall: false
|
|
||||||
|
|
||||||
additionalVolumes:
|
media:
|
||||||
- name: qbittorrent-scripts
|
enabled: false
|
||||||
emptyDir: {}
|
emptyDir: false
|
||||||
## When you want to enable automatic port configuration at startup, adjust this to:
|
mountPath: /media
|
||||||
# configMap:
|
## Persistent Volume Storage Class
|
||||||
# name: <RELEASENAME>-scripts
|
## If defined, storageClassName: <storageClass>
|
||||||
# defaultMode: 511
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
- name: downloads
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
emptyDir: {}
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
## When using persistence.downloads.enabled: true, adjust this to:
|
## GKE, AWS & OpenStack)
|
||||||
# persistentVolumeClaim:
|
# storageClass: "-"
|
||||||
# claimName: qbittorrent-downloads
|
# accessMode: ReadWriteOnce
|
||||||
|
# size: 1Gi
|
||||||
|
## Do not delete the pvc upon helm uninstall
|
||||||
|
# skipuninstall: false
|
||||||
|
# existingClaim: ""
|
||||||
|
|
||||||
additionalVolumeMounts:
|
downloads:
|
||||||
- mountPath: /config/custom-cont-init.d
|
enabled: false
|
||||||
name: qbittorrent-scripts
|
emptyDir: false
|
||||||
- name: downloads
|
mountPath: /downloads
|
||||||
mountPath: /downloads
|
## Persistent Volume Storage Class
|
||||||
|
## 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: "-"
|
||||||
|
# accessMode: ReadWriteOnce
|
||||||
|
# size: 1Gi
|
||||||
|
## Do not delete the pvc upon helm uninstall
|
||||||
|
# skipuninstall: false
|
||||||
|
# existingClaim: ""
|
||||||
|
|
||||||
|
additionalVolumes:
|
||||||
|
- name: qbittorrent-scripts
|
||||||
|
emptyDir: {}
|
||||||
|
## When you want to enable automatic port configuration at startup, adjust this to:
|
||||||
|
# configMap:
|
||||||
|
# name: <RELEASENAME>-scripts
|
||||||
|
# defaultMode: 511
|
||||||
|
|
||||||
|
additionalVolumeMounts:
|
||||||
|
- mountPath: /config/custom-cont-init.d
|
||||||
|
name: qbittorrent-scripts
|
||||||
|
Loading…
Reference in New Issue
Block a user