feat(forgejo): dump meilisearch every 6h

This commit is contained in:
Peter 2025-02-19 08:37:28 +01:00
parent 0f42edce42
commit 5805f98d32
Signed by: prskr
GPG key ID: F56BED6903BC5E37
2 changed files with 26 additions and 0 deletions
forgejo
kustomization.yaml
resources/meilisearch

View file

@ -21,6 +21,7 @@ resources:
- resources/db/db.yaml
- resources/db/user.yaml
- resources/meilisearch/pvc.yaml
- resources/meilisearch/backup.yaml
- resources/secrets/admin-credentials.yaml
- resources/secrets/infra-credentials.yaml
- resources/secrets/meili-credentials.yaml

View file

@ -0,0 +1,25 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: meilisearch-backup
spec:
schedule: "* */6 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: meilisearch-backup
image: alpine/curl:latest
imagePullPolicy: IfNotPresent
command:
- /bin/ash
- -c
- 'curl -X POST -H "Authorization: Bearer ${MEILI_MASTER_KEY}" "${MEILISEARCH_URL}/dumps"'
env:
- name: MEILISEARCH_URL
value: http://forgejo-indexer-meilisearch.forgejo.svc:7700
envFrom:
- secretRef:
name: meili-credentials
restartPolicy: OnFailure