mirror of
https://github.com/auricom/home-cluster.git
synced 2025-10-01 07:55:06 +02:00
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
---
|
|
# 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:22b31ee533fc6bbc75767241a2ce80d23fc3788cd38bbd6bcf2c4d21cf1d842c
|
|
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"
|