mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
fix: envoy-gateway migration
This commit is contained in:
69
kubernetes/apps/default/lychee/sync/helmrelease.yaml
Normal file
69
kubernetes/apps/default/lychee/sync/helmrelease.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
# 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: &app lychee-sync
|
||||
spec:
|
||||
interval: 1h
|
||||
chartRef:
|
||||
kind: OCIRepository
|
||||
name: app-template
|
||||
install:
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
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.33@sha256:64d2ccc1e85ed34a7612026bb31bbc052776d58e94063f7d9a5c5bcf89630b8a
|
||||
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 app $LYCHEE_POD -- php artisan lychee:sync /mnt/storage/photo/Gallery/ --skip_duplicates=1
|
||||
else
|
||||
echo "lychee deployment not found"
|
||||
exit 1
|
||||
fi
|
||||
service:
|
||||
app:
|
||||
controller: *app
|
||||
enabled: false
|
||||
serviceAccount:
|
||||
lychee-sync: {}
|
||||
rbac:
|
||||
roles:
|
||||
lychee-sync:
|
||||
type: ClusterRole
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec"]
|
||||
verbs: ["create"]
|
||||
bindings:
|
||||
gatus:
|
||||
type: ClusterRoleBinding
|
||||
roleRef:
|
||||
identifier: lychee-sync
|
||||
subjects:
|
||||
- identifier: lychee-sync
|
6
kubernetes/apps/default/lychee/sync/kustomization.yaml
Normal file
6
kubernetes/apps/default/lychee/sync/kustomization.yaml
Normal file
@@ -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