Add qb.
This commit is contained in:
parent
9eef986316
commit
aa2c056edd
3 changed files with 234 additions and 0 deletions
30
kubernetes/apps/default/qbittorrent/app/externalsecret.yaml
Normal file
30
kubernetes/apps/default/qbittorrent/app/externalsecret.yaml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/external-secrets.io/externalsecret_v1beta1.json
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: qbittorrent
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: onepassword-connect
|
||||
target:
|
||||
name: qbittorrent-secret
|
||||
creationPolicy: Owner
|
||||
data:
|
||||
- secretKey: VPN_ENDPOINT_IP
|
||||
remoteRef:
|
||||
key: ProtonVPN
|
||||
property: qbittorrent_vpn_endpoint_ip
|
||||
- secretKey: WIREGUARD_PUBLIC_KEY
|
||||
remoteRef:
|
||||
key: ProtonVPN
|
||||
property: qbittorrent_wireguard_public_key
|
||||
- secretKey: WIREGUARD_PRIVATE_KEY
|
||||
remoteRef:
|
||||
key: ProtonVPN
|
||||
property: qbittorrent_wireguard_private_key
|
||||
- secretKey: WIREGUARD_ADDRESSES
|
||||
remoteRef:
|
||||
key: ProtonVPN
|
||||
property: qbittorrent_wireguard_addresses
|
144
kubernetes/apps/default/qbittorrent/app/helmrelease.yaml
Normal file
144
kubernetes/apps/default/qbittorrent/app/helmrelease.yaml
Normal file
|
@ -0,0 +1,144 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: qbittorrent
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 2.4.0
|
||||
interval: 30m
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjw-s
|
||||
namespace: flux-system
|
||||
|
||||
values:
|
||||
controllers:
|
||||
main:
|
||||
annotations:
|
||||
configmap.reloader.stakater.com/reload: qbittorrent-scripts
|
||||
secret.reloader.stakater.com/reload: qbittorrent-secret
|
||||
|
||||
pod:
|
||||
securityContext:
|
||||
fsGroup: 568
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
containers:
|
||||
main:
|
||||
nameOverride: qbittorrent
|
||||
image:
|
||||
repository: ghcr.io/onedr0p/qbittorrent
|
||||
tag: 4.6.2@sha256:fedb62126c82ae0c7192e9052633411294a27e9c233613c03b0a8d168d160040
|
||||
env:
|
||||
UMASK: "022"
|
||||
QBITTORRENT__PORT: &port 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: 49m
|
||||
memory: 1024Mi
|
||||
limits:
|
||||
memory: 8192Mi
|
||||
securityContext:
|
||||
runAsUser: 568
|
||||
runAsGroup: 568
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
|
||||
gluetun:
|
||||
image:
|
||||
repository: ghcr.io/qdm12/gluetun
|
||||
tag: latest@sha256:450a487b23cd460da99b025b32b22fbccd41e7f3a0b083d34326d5a4c88519b0
|
||||
env:
|
||||
VPN_SERVICE_PROVIDER: custom
|
||||
VPN_TYPE: wireguard
|
||||
VPN_INTERFACE: wg0
|
||||
VPN_ENDPOINT_PORT: 51820
|
||||
VPN_PORT_FORWARDING: on
|
||||
VPN_PORT_FORWARDING_PROVIDER: protonvpn
|
||||
FIREWALL_INPUT_PORTS: 8080
|
||||
FIREWALL_OUTBOUND_SUBNETS: 10.32.0.0/16,10.33.0.0/16 # Allow access to k8s subnets
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: qbittorrent-secret
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
allowPrivilegeEscalation: false
|
||||
|
||||
port-forward:
|
||||
image:
|
||||
repository: ghcr.io/bjw-s/gluetun-qb-port-sync
|
||||
tag: v0.0.1
|
||||
env:
|
||||
GLUETUN_CONTROL_SERVER_HOST: localhost
|
||||
GLUETUN_CONTROL_SERVER_PORT: 8000
|
||||
QBITTORRENT_HOST: localhost
|
||||
QBITTORRENT_WEBUI_PORT: *port
|
||||
CRON_ENABLED: true
|
||||
CRON_SCHEDULE: "*/5 * * * *"
|
||||
LOG_TIMESTAMP: false
|
||||
securityContext:
|
||||
runAsUser: 568
|
||||
runAsGroup: 568
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: *port
|
||||
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
className: "internal-nginx"
|
||||
hosts:
|
||||
- host: "qb.jahanson.tech"
|
||||
paths:
|
||||
- path: /
|
||||
service:
|
||||
name: main
|
||||
port: http
|
||||
tls:
|
||||
- hosts:
|
||||
- "qb.jahanson.tech"
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
className: local-hostpath
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /config
|
||||
scripts:
|
||||
type: configMap
|
||||
name: qbittorrent-scripts
|
||||
defaultMode: 0775
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /scripts
|
||||
readOnly: true
|
||||
media:
|
||||
type: nfs
|
||||
server: 10.1.1.30
|
||||
path: /mnt/Nahar/Media
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /data/nas-media
|
60
kubernetes/apps/default/qbittorrent/ks.yaml
Normal file
60
kubernetes/apps/default/qbittorrent/ks.yaml
Normal file
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &appname qbittorrent
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: default
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *appname
|
||||
interval: 10m
|
||||
path: "./kubernetes/apps/default/qbittorrent/app"
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-ops-kubernetes
|
||||
wait: true
|
||||
dependsOn:
|
||||
- name: rook-ceph-cluster
|
||||
- name: volsync
|
||||
- name: external-secrets-stores
|
||||
postBuild:
|
||||
substitute:
|
||||
APP: *appname
|
||||
HOSTNAME: qbittorrent.bjw-s.dev
|
||||
APP_UID: "568"
|
||||
APP_GID: "568"
|
||||
VOLSYNC_CLAIM: qbittorrent-config
|
||||
VOLSYNC_CAPACITY: 2Gi
|
||||
VOLSYNC_ACCESSMODES: ReadWriteMany
|
||||
VOLSYNC_STORAGECLASS: ceph-filesystem
|
||||
VOLSYNC_SNAPSHOTCLASS: csi-ceph-filesystem
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &appname qbtools
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: default
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *appname
|
||||
interval: 10m
|
||||
path: "./kubernetes/apps/default/qbittorrent/tools"
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-ops-kubernetes
|
||||
wait: false
|
||||
dependsOn:
|
||||
- name: qbittorrent
|
||||
postBuild:
|
||||
substitute:
|
||||
APP: *appname
|
||||
APP_UID: "568"
|
||||
APP_GID: "568"
|
Loading…
Reference in a new issue