convert to use app-template

This commit is contained in:
2024-05-29 13:28:01 -05:00
parent 1fe503b586
commit bf9283eb41
6 changed files with 209 additions and 67 deletions

View File

@@ -1,14 +1,21 @@
apiVersion: v2
name: qbittorrent
version: 0.0.7
version: 1.0.0
description: qBittorrent
home:
keywords:
- downloads
- torrent
sources:
- https://github.com/qbittorrent/qBittorrent
- https://docs.linuxserver.io/images/docker-qbittorrent/
- https://github.com/qdm12/gluetun
- https://github.com/alexlebens/helm-charts/tree/main/charts/homepage
- https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template
maintainers:
- name: alexlebens
dependencies:
- name: qbittorrent
version: 0.0.8
repository: http://alexlebens.github.io/helm-charts
appVersion: "version-4.6.3-r0"
icon: https://avatars.githubusercontent.com/u/2131270?s=48&v=4
appVersion: version-4.6.3-r0

View File

@@ -4,7 +4,7 @@ metadata:
name: qbittorrent-auth
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/name: qbittorrent-auth
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
@@ -18,7 +18,7 @@ spec:
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /qbittorrent/auth
key: /cl01tl/qbittorrent/auth
metadataPolicy: None
property: admin-password
@@ -29,7 +29,7 @@ metadata:
name: qbittorrent-wireguard-conf
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/name: qbittorrent-wireguard-conf
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: web
@@ -43,6 +43,6 @@ spec:
remoteRef:
conversionStrategy: Default
decodingStrategy: None
key: /qbittorrent/config
key: /cl01tl/qbittorrent/config
metadataPolicy: None
property: wg0.conf

View File

@@ -1,5 +1,27 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: qbittorrent-config
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: qbittorrent-config
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: storage
app.kubernetes.io/part-of: {{ .Release.Name }}
spec:
volumeName: pvc-43f8b890-23c0-4f2b-b827-20055a8b4777
storageClassName: nfs-client
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: qbittorrent-nfs-storage
namespace: {{ .Release.Namespace }}

View File

@@ -4,7 +4,7 @@ metadata:
name: qbittorrent-nfs-storage
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Release.Name }}
app.kubernetes.io/name: qbittorrent-nfs-storage
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: storage
@@ -17,8 +17,8 @@ spec:
accessModes:
- ReadWriteMany
nfs:
path: {{ .Values.persistence.media.nfsPath }}
server: {{ .Values.persistence.media.nfsServer }}
path: /volume2/Storage
server: synologybond.alexlebens.net
mountOptions:
- vers=4
- minorversion=1

View File

@@ -0,0 +1,21 @@
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: {{ .Release.Name }}
spec:
endpoints:
- port: metrics
interval: 30s
scrapeTimeout: 15s
path: /metrics
selector:
matchLabels:
app.kubernetes.io/name: qbittorrent
app.kubernetes.io/instance: {{ .Release.Name }}

View File

@@ -1,64 +1,156 @@
qbittorrent:
global:
persistence:
media:
claimName: qbittorrent-nfs-storage
mountPath: /mnt/store
server:
env:
- name: TZ
value: US/Central
- name: PUID
value: "1000"
- name: PGID
value: "1000"
resources:
requests:
cpu: 100m
memory: 2Gi
limits:
cpu: 2000m
memory: 2Gi
ingress:
enabled: true
controllers:
main:
type: deployment
replicas: 1
strategy: Recreate
revisionHistoryLimit: 3
containers:
qbittorrent:
image:
repository: linuxserver/qbittorrent
tag: version-4.6.3-r0
pullPolicy: IfNotPresent
env:
- name: TZ
value: US/Central
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: UMASK_SET
value: "002"
- name: WEBUI_PORT
value: 8080
resources:
requests:
cpu: 100m
memory: 1Gi
gluetun:
image:
repository: ghcr.io/qdm12/gluetun
tag: v3.38.0
pullPolicy: IfNotPresent
env:
- name: VPN_SERVICE_PROVIDER
value: custom
- name: VPN_TYPE
value: wireguard
- name: FIREWALL_OUTBOUND_SUBNETS
value: 192.168.1.0/24,10.244.0.0/16
- name: FIREWALL_INPUT_PORTS
value: 8080,9022
- name: DOT
value: "off"
securityContext:
privileged: True
capabilities:
add:
- NET_ADMIN
resources:
requests:
cpu: 100m
memory: 256Mi
exporter:
image:
repository: esanchezm/prometheus-qbittorrent-exporter
tag: v1.5.1
pullPolicy: IfNotPresent
env:
- name: QBITTORRENT_HOST
value: "http://localhost"
- name: QBITTORRENT_PORT
value: "8080"
- name: EXPORTER_PORT
value: "9022"
- name: QBITTORRENT_USER
value: admin
- name: QBITTORRENT_PASS
valueFrom:
secretKeyRef:
name: qbittorrent-auth
key: admin-password
- name: EXPORTER_LOG_LEVEL
value: INFO
resources:
requests:
cpu: 100m
memory: 256Mi
serviceAccount:
create: true
service:
http:
controller: main
ports:
http:
port: 8080
targetPort: 8080
protocol: HTTP
health:
controller: main
ports:
http:
port: 9999
targetPort: 9999
protocol: HTTP
metrics:
controller: main
ports:
http:
port: 9022
targetPort: 9022
protocol: HTTP
ingress:
main:
className: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
cert-manager.io/cluster-issuer: letsencrypt-issuer
host: qbittorrent.alexlebens.net
persistence:
config:
storageClassName: nfs-client
storageSize: 1Gi
gluetun:
enabled: true
env:
- name: VPN_SERVICE_PROVIDER
value: custom
- name: VPN_TYPE
value: wireguard
- name: FIREWALL_OUTBOUND_SUBNETS
value: 192.168.1.0/24,10.244.0.0/16
- name: FIREWALL_INPUT_PORTS
value: 8080,9022
- name: DOT
value: "off"
existingSecretName: qbittorrent-wireguard-conf
metrics:
enabled: true
serviceMonitor:
hosts:
- host: qbittorrent.alexlebens.net
paths:
- path: /
pathType: Prefix
service:
name: qbittorrent-http
port: 8000
tls:
- secretName: qbittorrent-secret-tls
hosts:
- qbittorrent.alexlebens.net
persistence:
config:
existingClaim: qbittorrent-config
advancedMounts:
main:
qbittorrent:
- path: /config
readOnly: false
storage:
existingClaim: qbittorrent-nfs-storage
advancedMounts:
main:
qbittorrent:
- path: /mnt/store
readOnly: false
wireguard-config:
enabled: true
exporter:
env:
- name: QBITTORRENT_USER
value: admin
- name: QBITTORRENT_PASS
valueFrom:
secretKeyRef:
name: qbittorrent-auth
key: admin-password
persistence:
media:
nfsPath: /volume2/Storage
nfsServer: synologybond.alexlebens.net
type: secret
name: qbittorrent-wireguard-conf
advancedMounts:
main:
main:
- path: /gluetun/wireguard/wg0.conf
readOnly: true
mountPropagation: None
subPath: wg0.conf
tunnel-device:
enabled: true
type: hostPath
path: /dev/net/tun
advancedMounts:
main:
gluetun:
- path: /dev/net/tun
readOnly: false