♻️ apply kube templates

This commit is contained in:
auricom
2024-01-23 17:22:40 +01:00
parent d384984388
commit cb87a67dd2
262 changed files with 1510 additions and 3360 deletions

View File

@@ -1,22 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: qbittorrent-gatus-ep
namespace: default
labels:
gatus.io/enabled: "true"
data:
config.yaml: |
endpoints:
- name: qbittorrent
group: internal
url: https://qbittorrent.${SECRET_CLUSTER_DOMAIN}
interval: 1m
client:
insecure: true
conditions:
- "[STATUS] == 200"
alerts:
- type: pushover

View File

@@ -35,7 +35,6 @@ spec:
fsGroupChangePolicy: OnRootMismatch
controllers:
main:
type: statefulset
containers:
main:
image:
@@ -51,14 +50,6 @@ spec:
memory: 1Gi
limits:
memory: 8Gi
statefulset:
volumeClaimTemplates:
- name: config
accessMode: ReadWriteOnce
size: 1Gi
storageClass: rook-ceph-block
globalMounts:
- path: /config
service:
main:
ports:
@@ -93,6 +84,11 @@ spec:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: *app
globalMounts:
- path: /config
downloads:
type: nfs
server: "${LOCAL_LAN_TRUENAS}"

View File

@@ -4,7 +4,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ./gatus.yaml
- ./helmrelease.yaml
- ./upgrade-p2pblocklist
- ./volsync.yaml
- ../../../../templates/gatus/guarded
- ../../../../templates/volsync

View File

@@ -53,9 +53,9 @@ spec:
QBITTORRENT_POD=$(echo $result | awk '{ print $NF }')
if [[ $QBITTORRENT_POD == *"qbittorrent"* ]]; then
kubectl cp /tmp/ipfilter.dat default/$QBITTORRENT_POD:/config/ipfilter.dat
kubectl rollout restart statefulset qbittorrent --namespace default
kubectl rollout restart deployment qbittorrent --namespace default
else
echo "qbittorrent statefulset not found"
echo "qbittorrent deployment not found"
exit 1
fi
service:

View File

@@ -1,48 +0,0 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/external-secrets.io/externalsecret_v1beta1.json
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: qbittorrent-restic
namespace: default
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: qbittorrent-restic-secret
template:
engineVersion: v2
data:
RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/qbittorrent'
RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}'
AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}'
dataFrom:
- extract:
key: volsync-restic-template
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/volsync.backube/replicationsource_v1alpha1.json
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: qbittorrent
namespace: default
spec:
sourcePVC: config-qbittorrent-0
trigger:
schedule: "0 7 * * *"
restic:
copyMethod: Snapshot
pruneIntervalDays: 7
repository: qbittorrent-restic-secret
cacheCapacity: 2Gi
volumeSnapshotClassName: csi-ceph-blockpool
storageClassName: rook-ceph-block
moverSecurityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
retain:
daily: 7
within: 3d

View File

@@ -3,17 +3,26 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-apps-qbittorrent-app
name: &app qbittorrent
namespace: flux-system
spec:
targetNamespace: default
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: cluster-apps-rook-ceph-cluster
- name: cluster-apps-volsync-app
- name: rook-ceph-cluster
- name: volsync
path: ./kubernetes/apps/default/qbittorrent/app
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 3m
timeout: 5m
postBuild:
substitute:
APP: *app
VOLSYNC_CAPACITY: 2Gi