[rtorrent-flood] Migrate to common v3 (#1050)

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-06-22 16:20:59 +02:00 committed by GitHub
parent d3ec5370c8
commit 6a388c870b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 93 additions and 97 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: latest appVersion: latest
description: rTorrent is a stable, high-performance and low resource consumption BitTorrent client. description: rTorrent is a stable, high-performance and low resource consumption BitTorrent client.
name: rtorrent-flood name: rtorrent-flood
version: 7.3.0 version: 8.0.0
kubeVersion: ">=1.16.0-0" kubeVersion: ">=1.16.0-0"
keywords: keywords:
- rtorrent - rtorrent
@ -21,4 +21,4 @@ maintainers:
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.k8s-at-home.com repository: https://library-charts.k8s-at-home.com
version: 2.5.0 version: 3.2.0

View File

@ -1,6 +1,6 @@
# rtorrent-flood # rtorrent-flood
![Version: 7.3.0](https://img.shields.io/badge/Version-7.3.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) ![Version: 8.0.0](https://img.shields.io/badge/Version-8.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
rTorrent is a stable, high-performance and low resource consumption BitTorrent client. rTorrent is a stable, high-performance and low resource consumption BitTorrent client.
@ -21,7 +21,7 @@ Kubernetes: `>=1.16.0-0`
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| |------------|------|---------|
| https://library-charts.k8s-at-home.com | common | 2.5.0 | | https://library-charts.k8s-at-home.com | common | 3.2.0 |
## TL;DR ## TL;DR
@ -79,28 +79,20 @@ N/A
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| config | string | string | Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc | | config | string | string | Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc |
| env.FLOOD_OPTION_ALLOWEDPATH | string | `"/downloads"` | | | env | object | See below | environment variables. See [image docs](https://github.com/jesec/flood#configuration) for more details. |
| env.FLOOD_OPTION_HOST | string | `"0.0.0.0"` | | | env.FLOOD_OPTION_ALLOWEDPATH | string | `"/downloads"` | Allowed path for file operations |
| env.FLOOD_OPTION_PORT | string | `"3000"` | | | env.FLOOD_OPTION_HOST | string | `"0.0.0.0"` | The host that Flood should listen for web connections on |
| env.FLOOD_OPTION_RTORRENT | string | `"true"` | | | env.FLOOD_OPTION_PORT | string | `"3000"` | The port that Flood should listen for web connections on |
| env.HOME | string | `"/config"` | | | env.FLOOD_OPTION_RTORRENT | string | `"true"` | ADVANCED: rTorrent daemon managed by Flood |
| image.pullPolicy | string | `"IfNotPresent"` | | | env.HOME | string | `"/config"` | Folder where Flood stores it's configuration |
| image.repository | string | `"jesec/rtorrent-flood"` | | | env.TZ | string | `"UTC"` | Set the container timezone |
| image.tag | string | `"latest@sha256:5ff0125ea0e2befbc2ba2f2143e130819db645cb5ef68b44a0712b8162a16f47"` | | | image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| ingress.enabled | bool | `false` | | | image.repository | string | `"jesec/rtorrent-flood"` | image repository |
| persistence.config.emptyDir.enabled | bool | `false` | | | image.tag | string | `"latest@sha256:f0c894ec459e52d85bc69685247ddbd8e8fcf3709b50bf8ee8b0df3bf69b7b49"` | image tag |
| persistence.config.enabled | bool | `false` | | | ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| persistence.downloads.emptyDir.enabled | bool | `false` | | | initContainers | list | See values.yaml | Use an initContainer tto delete the rtorrent.lock file when the pod starts this is only required if `session.use_lock.set = no` is NOT set |
| persistence.downloads.enabled | bool | `false` | | | persistence | object | See values.yaml | Configure persistence settings for the chart under this key. |
| service.additionalServices[0].enabled | bool | `true` | | | service | object | See values.yaml | Configures service settings for the chart. |
| 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 | `3000` | |
| strategy.type | string | `"Recreate"` | |
## Changelog ## Changelog
@ -108,6 +100,14 @@ 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). 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).
### [8.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.2.0. 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.2.0/charts/stable/common/) for the up-to-date values.
- Changed image tag to `latest@sha256:f0c894ec459e52d85bc69685247ddbd8e8fcf3709b50bf8ee8b0df3bf69b7b49`.
### [6.0.0] ### [6.0.0]
#### Added #### Added
@ -136,8 +136,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[6.0.0]: #6.0.0 [8.0.0]: #800
[5.0.1]: #5.0.1 [6.0.0]: #600
[5.0.1]: #501
## Support ## Support

View File

@ -9,6 +9,14 @@ 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). 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).
### [8.0.0]
#### Changed
- **BREAKING**: Upgraded the common library dependency to version 3.2.0. 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.2.0/charts/stable/common/) for the up-to-date values.
- Changed image tag to `latest@sha256:f0c894ec459e52d85bc69685247ddbd8e8fcf3709b50bf8ee8b0df3bf69b7b49`.
### [6.0.0] ### [6.0.0]
#### Added #### Added
@ -37,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- N/A - N/A
[6.0.0]: #6.0.0 [8.0.0]: #800
[5.0.1]: #5.0.1 [6.0.0]: #600
[5.0.1]: #501
{{- end -}} {{- end -}}

View File

@ -1,9 +1,7 @@
persistence: persistence:
config: config:
enabled: true enabled: true
emptyDir: type: emptyDir
enabled: true
downloads: downloads:
enabled: true enabled: true
emptyDir: type: emptyDir
enabled: true

View File

@ -1,31 +1,19 @@
{{/* Make sure all variables are set properly */}} {{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }} {{- include "common.values.setup" . }}
{{/* Append the configMap to the additionalVolumes */}} {{/* Append the hardcoded settings */}}
{{- define "rtorrent-flood.configmap.volume" -}} {{- define "rtorrent-flood.harcodedValues" -}}
name: rtorrent-flood-config persistence:
rtorrent-flood-config:
enabled: true
mountPath: "/config/.rtorrent.rc"
subPath: ".rtorrent.rc"
type: "custom"
volumeSpec:
configMap: configMap:
name: {{ template "common.names.fullname" . }}-config name: {{ include "common.names.fullname" . }}-config
{{- end -}}
{{- $volume := include "rtorrent-flood.configmap.volume" . | fromYaml -}}
{{- if $volume -}}
{{- $additionalVolumes := append .Values.additionalVolumes $volume }}
{{- $_ := set .Values "additionalVolumes" (deepCopy $additionalVolumes) -}}
{{- end -}}
{{/* Append the configMap volume to the additionalVolumeMounts */}}
{{- define "rtorrent-flood.configmap.volumeMount" -}}
name: rtorrent-flood-config
mountPath: /config/.rtorrent.rc
subPath: .rtorrent.rc
{{- end -}}
{{- $volumeMount := include "rtorrent-flood.configmap.volumeMount" . | fromYaml -}}
{{- if $volumeMount -}}
{{- $additionalVolumeMounts := append .Values.additionalVolumeMounts $volumeMount }}
{{- $_ := set .Values "additionalVolumeMounts" (deepCopy $additionalVolumeMounts) -}}
{{- end -}} {{- end -}}
{{- $_ := mergeOverwrite .Values (include "rtorrent-flood.harcodedValues" . | fromYaml) -}}
{{/* Render the templates */}} {{/* Render the templates */}}
{{ include "common.all" . }} {{ include "common.all" . }}

View File

@ -1,9 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ template "common.names.fullname" . }}-config name: {{ include "common.names.fullname" . }}-config
labels: labels:
{{- include "common.labels" . | nindent 4 }} {{- include "common.labels" . | nindent 4 }}
data: data:
.rtorrent.rc: | .rtorrent.rc: |
{{ .Values.config | indent 4 }} {{- .Values.config | nindent 4 }}

View File

@ -5,9 +5,10 @@
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml # https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
# #
# # Use an initContainer to delete the rtorrent.lock file when the pod starts # -- Use an initContainer tto delete the rtorrent.lock file when the pod starts
# # this is only required if `session.use_lock.set = no` is NOT set # this is only required if `session.use_lock.set = no` is NOT set
# initContainers: # @default -- See values.yaml
initContainers: []
# - name: remove-session-lock # - name: remove-session-lock
# image: busybox # image: busybox
# command: ["sh", "-c", "rm -rf /config/.local/share/rtorrent/.session/rtorrent.lock"] # command: ["sh", "-c", "rm -rf /config/.local/share/rtorrent/.session/rtorrent.lock"]
@ -16,61 +17,60 @@
# mountPath: /config # mountPath: /config
image: image:
# -- image repository
repository: jesec/rtorrent-flood repository: jesec/rtorrent-flood
# -- image tag
tag: latest@sha256:f0c894ec459e52d85bc69685247ddbd8e8fcf3709b50bf8ee8b0df3bf69b7b49
# -- image pull policy
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: latest@sha256:5ff0125ea0e2befbc2ba2f2143e130819db645cb5ef68b44a0712b8162a16f47
strategy: # -- environment variables. See [image docs](https://github.com/jesec/flood#configuration) for more details.
type: Recreate # @default -- See below
# Environment configuration - for more options see:
# https://github.com/jesec/flood#configuration
env: env:
# TZ: # -- Set the container timezone
TZ: UTC
# -- Folder where Flood stores it's configuration
HOME: "/config" HOME: "/config"
# -- The host that Flood should listen for web connections on
FLOOD_OPTION_HOST: "0.0.0.0" FLOOD_OPTION_HOST: "0.0.0.0"
# -- The port that Flood should listen for web connections on
FLOOD_OPTION_PORT: "3000" FLOOD_OPTION_PORT: "3000"
# -- ADVANCED: rTorrent daemon managed by Flood
FLOOD_OPTION_RTORRENT: "true" FLOOD_OPTION_RTORRENT: "true"
# -- Allowed path for file operations
FLOOD_OPTION_ALLOWEDPATH: "/downloads" FLOOD_OPTION_ALLOWEDPATH: "/downloads"
# -- Configures service settings for the chart.
# @default -- See values.yaml
service: service:
port: main:
ports:
http:
port: 3000 port: 3000
additionalServices: bittorrent:
- enabled: true enabled: false
nameSuffix: bittorrent
type: ClusterIP type: ClusterIP
port: ports:
bittorrent:
enabled: true
port: 6881 port: 6881
name: bittorrent
protocol: TCP protocol: TCP
targetPort: 6881 targetPort: 6881
ingress: ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See values.yaml
main:
enabled: false enabled: false
# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence: persistence:
config: config:
enabled: false enabled: false
emptyDir:
enabled: false
downloads: downloads:
enabled: false enabled: false
emptyDir:
enabled: false
## 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: ""
# -- Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc # -- Minimal configuration provided from https://github.com/jesec/rtorrent/blob/master/doc/rtorrent.rc
# @default -- string # @default -- string