k3s-cluster/kubernetes/main/apps/download/qbittorrent/helm-release.yaml

141 lines
3.4 KiB
YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: qbittorrent
namespace: download
spec:
interval: 5m
chart:
spec:
chart: app-template
version: 3.1.0
sourceRef:
kind: HelmRepository
name: bjws-charts
namespace: flux-system
values:
controllers:
main:
pod:
securityContext:
fsGroup: 10000
fsGroupChangePolicy: "OnRootMismatch"
containers:
app:
image:
repository: ghcr.io/onedr0p/qbittorrent
tag: 5.0.0
env:
QBITTORRENT__PORT: 8080
securityContext:
runAsGroup: 10000
runAsUser: 10000
fsGroup: 10000
fsGroupChangePolicy: "OnRootMismatch"
gluetun:
image:
repository: qmcgaw/gluetun
tag: latest
env:
FIREWALL_INPUT_PORTS: "8080,17871" # 17871 is the prometheus exporter
FIREWALL_VPN_INPUT_PORTS: "41500"
HEALTH_VPN_DURATION_INITIAL: "120s"
envFrom:
- secretRef:
name: qbittorrent-secrets
securityContext:
capabilities:
add:
- NET_ADMIN
metrics:
image:
repository: caseyscarborough/qbittorrent-exporter
tag: v1.3.5
env:
QBITTORRENT_BASE_URL: "http://localhost:8080"
# safe to have in plain text since qbittorrent is exposed through authentik.
QBITTORRENT_LOGIN: admin
QBITTORRENT_PASSWORD: adminadmin
service:
app:
controller: main
ports:
http:
port: 8080
metrics:
port: 17871
protocol: HTTP
serviceMonitor:
app:
enabled: true
serviceName: qbittorrent
labels:
release: kube-prometheus-stack
endpoints:
- port: metrics
scheme: http
path: /metrics
interval: 3m
scrapeTimeout: 1m
ingress:
main:
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd
hosts:
- host: &host "qbit.${SECRET_NEW_DOMAIN}"
paths:
- path: /
service:
identifier: app
port: http
tls:
- hosts:
- *host
persistence:
storage:
type: hostPath
hostPath: /mnt/MainPool/Media/Torrents
globalMounts:
- path: /storage/Torrents
config:
type: hostPath
hostPath: /mnt/MainPool/Kubernetes/qbittorrent
advancedMounts:
main: # controller name
app: # container name
- path: /config
gluetun-tmp:
type: emptyDir
advancedMounts:
main: # controller name
gluetun: # container name
- path: /tmp/gluetun/
port-manager:
- path: /tmp/gluetun/
readOnly: true