[qbittorrent] Migrate to common v3 (#978)

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-06-11 19:33:15 +02:00 committed by GitHub
parent 3d73b38c7b
commit 25c3695e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 97 deletions

View File

@ -1,8 +1,8 @@
apiVersion: v2
appVersion: v4.3.4.1
appVersion: v4.3.5
description: qBittorrent is a cross-platform free and open-source BitTorrent client
name: qbittorrent
version: 10.1.0
version: 11.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- qbittorrent
@ -18,4 +18,4 @@ maintainers:
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 2.5.0
version: 3.0.2

View File

@ -1,6 +1,6 @@
# qbittorrent
![Version: 10.1.0](https://img.shields.io/badge/Version-10.1.0-informational?style=flat-square) ![AppVersion: v4.3.4.1](https://img.shields.io/badge/AppVersion-v4.3.4.1-informational?style=flat-square)
![Version: 11.0.0](https://img.shields.io/badge/Version-11.0.0-informational?style=flat-square) ![AppVersion: v4.3.5](https://img.shields.io/badge/AppVersion-v4.3.5-informational?style=flat-square)
qBittorrent is a cross-platform free and open-source BitTorrent client
@ -19,7 +19,7 @@ Kubernetes: `>=1.16.0-0`
| Repository | Name | Version |
|------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.5.0 |
| https://library-charts.k8s-at-home.com | common | 3.0.2 |
## TL;DR
@ -76,32 +76,15 @@ N/A
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalVolumeMounts[0].mountPath | string | `"/config/custom-cont-init.d"` | |
| additionalVolumeMounts[0].name | string | `"qbittorrent-scripts"` | |
| additionalVolumes[0].emptyDir | object | `{}` | |
| additionalVolumes[0].name | string | `"qbittorrent-scripts"` | |
| env | object | `{}` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/k8s-at-home/qbittorrent"` | |
| image.tag | string | `"v4.3.4.1"` | |
| ingress.enabled | bool | `false` | |
| persistence.config.emptyDir.enabled | bool | `false` | |
| persistence.config.enabled | bool | `false` | |
| persistence.downloads.emptyDir.enabled | bool | `false` | |
| persistence.downloads.enabled | bool | `false` | |
| persistence.downloads.mountPath | string | `"/downloads"` | |
| persistence.media.emptyDir.enabled | bool | `false` | |
| persistence.media.enabled | bool | `false` | |
| persistence.media.mountPath | string | `"/media"` | |
| service.additionalServices[0].enabled | bool | `true` | |
| service.additionalServices[0].nameSuffix | string | `"bittorrent"` | |
| service.additionalServices[0].port.name | string | `"bittorrent"` | |
| service.additionalServices[0].port.port | int | `6881` | |
| service.additionalServices[0].port.protocol | string | `"TCP"` | |
| service.additionalServices[0].port.targetPort | int | `6881` | |
| service.additionalServices[0].type | string | `"ClusterIP"` | |
| service.port.port | int | `8080` | |
| strategy.type | string | `"Recreate"` | |
| env | object | See below | environment variables. See [image docs](https://docs.k8s-at-home.com/our-container-images/configuration/) for more details. |
| env.TZ | string | `"UTC"` | Set the container timezone |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"ghcr.io/k8s-at-home/qbittorrent"` | image repository |
| image.tag | string | `"v4.3.5"` | image tag |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. |
| service | object | See values.yaml | Configures service settings for the chart. |
| settings.automaticPortSetup | bool | `false` | Enables automatic port configuration at startup This sets the qbittorrent port to the value of `service.bittorrent.ports.bittorrent.port`. |
## Changelog
@ -109,6 +92,15 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [11.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.0.2. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.0.2/charts/stable/common/) for the up-to-date values.
- Changed image tag to `v4.3.5`.
- Move automatic port management at startup to `settings.automaticPortSetup`.
### [10.0.0]
#### Changed

View File

@ -9,6 +9,15 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [11.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.0.2. This introduces several breaking changes (`service`, `ingress` and `persistence` keys have been refactored).
Be sure to check out the [library chart](https://github.com/k8s-at-home/library-charts/blob/common-3.0.2/charts/stable/common/) for the up-to-date values.
- Changed image tag to `v4.3.5`.
- Move automatic port management at startup to `settings.automaticPortSetup`.
### [10.0.0]
#### Changed

View File

@ -1 +1,19 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the configMap volume to the volumes */}}
{{- define "qbittorrent.configmapVolume" -}}
enabled: "true"
mountPath: "/config/custom-cont-init.d"
type: "custom"
volumeSpec:
configMap:
name: {{ include "common.names.fullname" . }}-scripts
defaultMode: 511
{{- end -}}
{{- if and .Values.settings.automaticPortSetup -}}
{{- $_ := set .Values.persistence "qbittorrent-scripts" (include "qbittorrent.configmapVolume" . | fromYaml) -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "common.all" . }}

View File

@ -5,14 +5,9 @@ metadata:
labels:
{{- include "common.labels" . | nindent 4 }}
data:
{{- /* Determine if the bittorrent port is set somewhere */ -}}
{{- $bittorrentPort := "" -}}
{{- range $extraServices := .Values.service.additionalServices }}
{{- if and .enabled (eq "bittorrent" .nameSuffix) -}}
{{- $bittorrentPort = .port.port -}}
{{- end }}
{{- end }}
{{- if $bittorrentPort }}
{{- /* Determine if the bittorrent port is enabled */ -}}
{{- $bittorrentPort := .Values.service.bittorrent.ports.bittorrent.port -}}
{{- if and .Values.settings.automaticPortSetup $bittorrentPort }}
31-update-port: |-
#!/bin/bash
QBITTORRENT_CONFIGFILE="/config/qBittorrent/qBittorrent.conf"

View File

@ -6,82 +6,57 @@
#
image:
# -- image repository
repository: ghcr.io/k8s-at-home/qbittorrent
# -- image tag
tag: v4.3.5
# -- image pull policy
pullPolicy: IfNotPresent
tag: v4.3.4.1
strategy:
type: Recreate
settings:
# -- Enables automatic port configuration at startup
# This sets the qbittorrent port to the value of `service.bittorrent.ports.bittorrent.port`.
automaticPortSetup: false
env: {}
# TZ: UTC
# -- environment variables. See [image docs](https://docs.k8s-at-home.com/our-container-images/configuration/) for more details.
# @default -- See below
env:
# -- Set the container timezone
TZ: UTC
# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
port:
main:
ports:
http:
port: 8080
additionalServices:
- enabled: true
nameSuffix: bittorrent
bittorrent:
enabled: false
type: ClusterIP
port:
ports:
bittorrent:
enabled: true
port: 6881
name: bittorrent
protocol: TCP
targetPort: 6881
ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: false
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
config:
enabled: false
emptyDir:
enabled: false
media:
enabled: false
emptyDir:
enabled: false
mountPath: /media
## 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: ""
downloads:
enabled: false
emptyDir:
enabled: false
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