mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
🚀 lychee-sync
This commit is contained in:
@@ -6,5 +6,6 @@ namespace: default
|
||||
resources:
|
||||
- ./externalsecret.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ./sync
|
||||
- ../../../../templates/gatus/guarded
|
||||
- ../../../../templates/volsync
|
||||
|
63
kubernetes/apps/default/lychee/app/sync/helmrelease.yaml
Normal file
63
kubernetes/apps/default/lychee/app/sync/helmrelease.yaml
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: lychee-sync
|
||||
namespace: default
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 2.5.0
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjw-s
|
||||
namespace: flux-system
|
||||
maxHistory: 2
|
||||
install:
|
||||
createNamespace: true
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
uninstall:
|
||||
keepHistory: false
|
||||
values:
|
||||
controllers:
|
||||
main:
|
||||
type: cronjob
|
||||
cronjob:
|
||||
concurrencyPolicy: Forbid
|
||||
schedule: "0 0 * * 1" # At 00:00 on Monday
|
||||
containers:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/auricom/kubectl
|
||||
tag: 1.29.1@sha256:fb732755039305d01cc996f539a42860924a877728ac9bfaec076538b49ee1c4
|
||||
command:
|
||||
- "/bin/bash"
|
||||
- "-c"
|
||||
- |
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
result=$(kubectl get pod --selector app.kubernetes.io/name=lychee --output custom-columns=:metadata.name --namespace default)
|
||||
LYCHEE_POD=$(echo $result | awk '{ print $NF }')
|
||||
if [[ $LYCHEE_POD == *"lychee"* ]]; then
|
||||
kubectl exec --stdin --container main $LYCHEE_POD -- php artisan lychee:sync /mnt/storage/photo/Gallery/ --skip_duplicates=1
|
||||
else
|
||||
echo "lychee deployment not found"
|
||||
exit 1
|
||||
fi
|
||||
service:
|
||||
main:
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
create: false
|
||||
name: "jobs"
|
@@ -0,0 +1,6 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/kustomization.json
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
Reference in New Issue
Block a user