Compare commits

...

4 Commits

Author SHA1 Message Date
57983912f5 remove node api and probes 2024-03-16 09:29:07 -06:00
8a6cfef4c5 add server IP env 2024-03-16 09:21:32 -06:00
7c9a06dcee add existing secret name for gluetun 2024-03-16 09:12:46 -06:00
580f9efa06 add qbittorrent 2024-03-16 09:04:25 -06:00
12 changed files with 359 additions and 31 deletions

View File

@@ -0,0 +1,13 @@
apiVersion: v2
name: qbittorrent
version: 0.0.2
description: Chart for qBittorrent
keywords:
- downloads
- torrent
sources:
- https://github.com/qbittorrent/qBittorrent
maintainers:
- name: alexlebens
icon: https://avatars.githubusercontent.com/u/2131270?s=48&v=4
appVersion: version-4.6.3-r0

View File

@@ -0,0 +1,17 @@
## Introduction
[qBittorrent](https://github.com/qbittorrent/qBittorrent)
qBittorrent is a bittorrent client programmed in C++ / Qt that uses libtorrent
This chart bootstraps a [qBittorrent](https://github.com/qbittorrent/qBittorrent) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes
- Helm
## Parameters
See the [values files](values.yaml).

View File

@@ -0,0 +1,130 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: qbittorrent
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: qbittorrent
spec:
revisionHistoryLimit: 3
replicas: {{ .Values.server.replicas }}
strategy:
type: {{ .Values.server.strategy }}
selector:
matchLabels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
serviceAccountName: qbittorrent
automountServiceAccountToken: true
containers:
- name: qbittorrent
image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}"
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
env:
{{- with (concat .Values.global.env .Values.server.env) }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: WEBUI_PORT
value: "{{ .Values.server.service.http.port }}"
resources:
{{- toYaml .Values.server.resources | nindent 12 }}
volumeMounts:
- name: qbittorrent-config
mountPath: /config
- name: media-storage
mountPath: {{ .Values.global.persistence.media.mountPath }}
{{- if .Values.gluetun.enabled }}
- name: gluetun
image: "{{.Values.gluetun.image.repository}}:{{.Values.gluetun.image.tag}}"
imagePullPolicy: {{ .Values.gluetun.image.pullPolicy }}
env:
{{- with (concat .Values.global.env .Values.server.env) }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: health
containerPort: {{ .Values.gluetun.service.health.port }}
protocol: TCP
- name: http
containerPort: {{ .Values.server.service.http.port }}
protocol: TCP
- name: metrics
containerPort: {{ .Values.metrics.exporter.env.port }}
protocol: TCP
securityContext:
{{- toYaml .Values.gluetun.securityContext | nindent 12 }}
resources:
{{- toYaml .Values.gluetun.resources | nindent 12 }}
livenessProbe:
tcpSocket:
port: {{ .Values.gluetun.service.health.port }}
initialDelaySeconds: 0
failureThreshold: 3
timeoutSeconds: 1
periodSeconds: 10
readinessProbe:
tcpSocket:
port: {{ .Values.gluetun.service.health.port }}
initialDelaySeconds: 0
failureThreshold: 3
timeoutSeconds: 1
periodSeconds: 10
startupProbe:
tcpSocket:
port: {{ .Values.gluetun.service.health.port }}
initialDelaySeconds: 0
failureThreshold: 30
timeoutSeconds: 1
periodSeconds: 5
volumeMounts:
- name: tunnel-device
mountPath: /dev/net/tun
- name: wg0-wireguard-config
mountPath: /gluetun/wireguard/
{{- end }}
{{- if .Values.metrics.enabled }}
- name: exporter
image: "{{ .Values.metrics.exporter.image.repository }}:{{.Values.metrics.exporter.image.tag }}"
imagePullPolicy: {{ .Values.metrics.exporter.image.pullPolicy }}
env:
{{- with (concat .Values.global.env .Values.server.env) }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: QBITTORRENT_HOST
value: "http://localhost"
- name: QBITTORRENT_PORT
value: "{{ .Values.server.service.http.port }}"
{{- end }}
volumes:
{{- if .Values.gluetun.enabled }}
- name: tunnel-device
hostPath:
path: /dev/net/tun
- name: wg0-wireguard-config
secret:
secretName: {{ .Values.gluetun.existingSecretName }}
items:
- key: wg0.conf
path: wg0.conf
{{- end }}
- name: qbittorrent-config
persistentVolumeClaim:
claimName: qbittorrent-config
- name: media-storage
persistentVolumeClaim:
claimName: {{ .Values.global.persistence.media.claimName }}

View File

@@ -0,0 +1,32 @@
{{- if .Values.server.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: qbittorrent
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: qbittorrent
annotations:
{{- toYaml .Values.server.ingress.annotations | nindent 4 }}
spec:
ingressClassName: {{ .Values.server.ingress.className }}
tls:
- hosts:
- {{ .Values.server.ingress.host }}
secretName: qbittorrent-secret-tls
rules:
- host: {{ .Values.server.ingress.host }}
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: qbittorrent-webui
port:
name: http
{{- end }}

View File

@@ -0,0 +1,19 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: qbittorrent-config
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: storage
app.kubernetes.io/part-of: qbittorrent
spec:
storageClassName: {{ .Values.server.persistence.config.storageClassName }}
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: {{ .Values.server.persistence.config.storageSize }}

View File

@@ -0,0 +1,13 @@
{{- if .Values.global.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: qbittorrent
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: qbittorrent
{{- end }}

View File

@@ -0,0 +1,23 @@
{{- if and .Values.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: qbittorrent
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: qbittorrent
spec:
endpoints:
- port: metrics
interval: {{ .Values.metrics.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
path: /metrics
selector:
matchLabels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: qbittorrent-webui
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
app.kubernetes.io/part-of: qbittorrent
spec:
type: ClusterIP
ports:
- port: {{ .Values.server.service.http.port }}
targetPort: http
protocol: TCP
name: http
selector:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -0,0 +1,86 @@
global:
serviceAccount:
create: true
env: []
persistence:
media:
claimName:
mountPath:
server:
replicas: 1
strategy: Recreate
image:
repository: linuxserver/qbittorrent
tag: "version-4.6.3-r0"
pullPolicy: IfNotPresent
env:
- name: TZ
value: UTC
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: UMASK_SET
value: "002"
resources:
requests:
cpu: 100m
memory: 2Gi
limits:
cpu: 2000m
memory: 2Gi
service:
http:
port: 8080
ingress:
enabled: false
className:
annotations:
host:
persistence:
config:
storageClassName:
storageSize:
gluetun:
enabled: false
image:
repository: ghcr.io/qdm12/gluetun
tag: v3.37.0
pullPolicy: IfNotPresent
securityContext:
privileged: True
capabilities:
add:
- NET_ADMIN
env: []
existingSecretName:
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
service:
health:
port: 9999
metrics:
enabled: false
serviceMonitor:
enabled: false
interval: 15s
scrapeTimeout: 5s
exporter:
image:
repository: esanchezm/prometheus-qbittorrent-exporter
tag: v1.5.1
imagePullPolicy: IfNotPresent
env:
- name: QBITTORRENT_USER
value: admin
- name: QBITTORRENT_PASS
value: ""
- name: EXPORTER_PORT
value: 9022
- name: EXPORTER_LOG_LEVEL
value: INFO

View File

@@ -1,6 +1,6 @@
apiVersion: v2 apiVersion: v2
name: tdarr name: tdarr
version: 0.0.1 version: 0.0.3
description: Chart for Tdarr V2 description: Chart for Tdarr V2
keywords: keywords:
- video - video

View File

@@ -132,10 +132,6 @@ spec:
- name: tdarr-node - name: tdarr-node
image: "{{ .Values.node.image.repository }}:{{ .Values.node.image.tag }}" image: "{{ .Values.node.image.repository }}:{{ .Values.node.image.tag }}"
imagePullPolicy: {{ .Values.node.image.pullPolicy }} imagePullPolicy: {{ .Values.node.image.pullPolicy }}
ports:
- name: api
containerPort: {{ .Values.node.service.api.port }}
protocol: TCP
env: env:
{{- with (concat .Values.global.env .Values.node.env) }} {{- with (concat .Values.global.env .Values.node.env) }}
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}
@@ -146,8 +142,10 @@ spec:
valueFrom: valueFrom:
fieldRef: fieldRef:
fieldPath: spec.nodeName fieldPath: spec.nodeName
- name: serverIP
value: tdarr-server-api
- name: serverPort - name: serverPort
value: "{{ .Values.node.service.api.port }}" value: "{{ .Values.server.service.api.port }}"
volumeMounts: volumeMounts:
- name: tdarr-node-cache - name: tdarr-node-cache
mountPath: /tcache mountPath: /tcache
@@ -155,27 +153,6 @@ spec:
mountPath: {{ .Values.global.persistence.media.mountPath }} mountPath: {{ .Values.global.persistence.media.mountPath }}
resources: resources:
{{- toYaml .Values.node.resources | nindent 12 }} {{- toYaml .Values.node.resources | nindent 12 }}
livenessProbe:
tcpSocket:
port: {{ .Values.node.service.api.port }}
initialDelaySeconds: 0
failureThreshold: 3
timeoutSeconds: 1
periodSeconds: 10
readinessProbe:
tcpSocket:
port: {{ .Values.node.service.api.port }}
initialDelaySeconds: 0
failureThreshold: 3
timeoutSeconds: 1
periodSeconds: 10
startupProbe:
tcpSocket:
port: {{ .Values.node.service.api.port }}
initialDelaySeconds: 0
failureThreshold: 30
timeoutSeconds: 1
periodSeconds: 5
volumes: volumes:
- name: tdarr-node-cache - name: tdarr-node-cache
emptyDir: emptyDir:

View File

@@ -69,9 +69,6 @@ node:
limits: limits:
cpu: 1000m cpu: 1000m
memory: 2Gi memory: 2Gi
service:
api:
port: 8266
persistence: persistence:
cache: cache:
size: 5Gi size: 5Gi