chore: update qbit-manage, update app-template, use kustomization
This commit is contained in:
parent
06dccd1a67
commit
30e30d6719
6 changed files with 105 additions and 79 deletions
|
@ -4,7 +4,7 @@ resources:
|
||||||
- ./namespace.yaml
|
- ./namespace.yaml
|
||||||
#- ./network_policy.yaml
|
#- ./network_policy.yaml
|
||||||
- ./qbittorrent/ks.yaml
|
- ./qbittorrent/ks.yaml
|
||||||
- ./qbit-manage
|
- ./qbit-manage/ks.yaml
|
||||||
- ./radarr/ks.yaml
|
- ./radarr/ks.yaml
|
||||||
- ./sonarr/ks.yaml
|
- ./sonarr/ks.yaml
|
||||||
- ./prowlarr
|
- ./prowlarr
|
||||||
|
|
|
@ -2,7 +2,6 @@ apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: qbit-manage
|
name: qbit-manage
|
||||||
namespace: download
|
|
||||||
data:
|
data:
|
||||||
config.yml: |-
|
config.yml: |-
|
||||||
commands:
|
commands:
|
|
@ -0,0 +1,74 @@
|
||||||
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: qbit-manage
|
||||||
|
spec:
|
||||||
|
interval: 5m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: app-template
|
||||||
|
version: 3.5.1
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: bjws-charts
|
||||||
|
namespace: flux-system
|
||||||
|
values:
|
||||||
|
controllers:
|
||||||
|
main:
|
||||||
|
pod:
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 10000
|
||||||
|
runAsGroup: 10000
|
||||||
|
fsGroup: 10000
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
|
initContainers:
|
||||||
|
copy-config:
|
||||||
|
image:
|
||||||
|
repository: alpine
|
||||||
|
tag: 3.20
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- "ls /tmp/config-ro
|
||||||
|
&& cp -r /tmp/config-ro/. /tmp/config/
|
||||||
|
&& chmod 777 /tmp/config/config.yml
|
||||||
|
&& ls /tmp/config"
|
||||||
|
containers:
|
||||||
|
app:
|
||||||
|
image:
|
||||||
|
repository: bobokun/qbit_manage
|
||||||
|
tag: v4.1.14
|
||||||
|
env:
|
||||||
|
QBT_STARTUP_DELAY: 45 # seconds
|
||||||
|
QBT_SCHEDULE: 720 # 720min = 12hr
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
storage:
|
||||||
|
type: hostPath
|
||||||
|
hostPath: /mnt/MainPool/Media/Torrents
|
||||||
|
globalMounts:
|
||||||
|
- path: /storage/Torrents
|
||||||
|
config:
|
||||||
|
type: emptyDir
|
||||||
|
advancedMounts:
|
||||||
|
main: # controller name
|
||||||
|
app: # container name
|
||||||
|
- path: /config
|
||||||
|
copy-config: # container name
|
||||||
|
- path: /tmp/config
|
||||||
|
# Create tmp mount of configmap that is copied to config.
|
||||||
|
#
|
||||||
|
# This is done since qbit-manage requires the /config directory to be writable,
|
||||||
|
# but ConfigMap mounts are always readonly.
|
||||||
|
config-tmp:
|
||||||
|
type: configMap
|
||||||
|
name: qbit-manage
|
||||||
|
items:
|
||||||
|
- key: config.yml
|
||||||
|
path: config.yml
|
||||||
|
advancedMounts:
|
||||||
|
main: # controller name
|
||||||
|
copy-config: # container name
|
||||||
|
- path: /tmp/config-ro
|
|
@ -1,77 +0,0 @@
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: qbit-manage
|
|
||||||
namespace: download
|
|
||||||
spec:
|
|
||||||
interval: 5m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: app-template
|
|
||||||
version: 1.3.x
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bjws-charts
|
|
||||||
namespace: flux-system
|
|
||||||
|
|
||||||
values:
|
|
||||||
initContainers:
|
|
||||||
# this init container copies the read only config from the configmap volume, into
|
|
||||||
# an emptydir volume mount that the pod can write to.
|
|
||||||
copy-config:
|
|
||||||
image: alpine:3.20
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -c
|
|
||||||
- "ls /tmp/config-ro
|
|
||||||
&& cp -r /tmp/config-ro/. /tmp/config/
|
|
||||||
&& chmod 777 /tmp/config/config.yml
|
|
||||||
&& ls /tmp/config"
|
|
||||||
volumeMounts:
|
|
||||||
- name: config-ro
|
|
||||||
mountPath: /tmp/config-ro
|
|
||||||
- name: config
|
|
||||||
mountPath: /tmp/config
|
|
||||||
|
|
||||||
image:
|
|
||||||
repository: bobokun/qbit_manage
|
|
||||||
tag: "v4.1.13"
|
|
||||||
|
|
||||||
env:
|
|
||||||
QBT_STARTUP_DELAY: 45 # seconds
|
|
||||||
QBT_SCHEDULE: 720 # 720min = 12hr
|
|
||||||
|
|
||||||
service:
|
|
||||||
main:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
persistence:
|
|
||||||
storage:
|
|
||||||
enabled: true
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /mnt/MainPool/Media/Torrents
|
|
||||||
mountPath: /storage/Torrents
|
|
||||||
|
|
||||||
config:
|
|
||||||
enabled: true
|
|
||||||
type: emptyDir
|
|
||||||
defaultMode: 777
|
|
||||||
mountPath: /config
|
|
||||||
|
|
||||||
config-ro:
|
|
||||||
enabled: true
|
|
||||||
type: custom
|
|
||||||
mountPath: /config-ro
|
|
||||||
volumeSpec:
|
|
||||||
configMap:
|
|
||||||
name: qbit-manage
|
|
||||||
items:
|
|
||||||
- key: "config.yml"
|
|
||||||
path: "config.yml"
|
|
||||||
|
|
||||||
podSecurityContext:
|
|
||||||
runAsNonRoot: true
|
|
||||||
runAsUser: 10000
|
|
||||||
runAsGroup: 10000
|
|
||||||
fsGroup: 10000
|
|
||||||
fsGroupChangePolicy: OnRootMismatch
|
|
30
kubernetes/main/apps/download/qbit-manage/ks.yaml
Normal file
30
kubernetes/main/apps/download/qbit-manage/ks.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: qbit-manage
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
timeout: 5m
|
||||||
|
interval: 10m
|
||||||
|
targetNamespace: download
|
||||||
|
path: ./kubernetes/main/apps/download/qbit-manage/app
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: home-cluster
|
||||||
|
decryption:
|
||||||
|
provider: sops
|
||||||
|
secretRef:
|
||||||
|
name: sops-gpg
|
||||||
|
dependsOn:
|
||||||
|
- name: openebs
|
||||||
|
- name: openebs-sc
|
||||||
|
- name: volsync
|
||||||
|
- name: qbittorrent
|
||||||
|
postBuild:
|
||||||
|
substituteFrom:
|
||||||
|
- kind: ConfigMap
|
||||||
|
name: cluster-settings
|
||||||
|
- kind: Secret
|
||||||
|
name: cluster-secrets
|
Loading…
Reference in a new issue