2024-12-07 01:32:10 +01:00
|
|
|
---
|
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: CronJob
|
|
|
|
metadata:
|
|
|
|
name: grafana-backuper
|
|
|
|
namespace: grafana-backuper
|
|
|
|
spec:
|
|
|
|
schedule: "0 * * * *"
|
|
|
|
successfulJobsHistoryLimit: 1
|
|
|
|
failedJobsHistoryLimit: 3
|
|
|
|
jobTemplate:
|
|
|
|
spec:
|
|
|
|
ttlSecondsAfterFinished: 3600
|
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: grafana-backuper
|
|
|
|
image: git.ar21.de/yolokube/grafana-backuper:latest
|
|
|
|
env:
|
|
|
|
- name: GB_GRAFANA_URL
|
2024-12-07 03:07:44 +01:00
|
|
|
value: "http://prometheus-grafana.prometheus/api"
|
2024-12-07 01:32:10 +01:00
|
|
|
- name: GB_GRAFANA_TOKEN
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: grafana-secrets
|
|
|
|
key: grafana-auth-token
|
|
|
|
- name: GB_GIT_REPO
|
|
|
|
value: "https://git.ar21.de/yolokube/grafana-dashboards.git"
|
|
|
|
- name: GB_GIT_BRANCH
|
|
|
|
value: "main"
|
|
|
|
- name: GB_GIT_USER
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-user
|
|
|
|
- name: GB_GIT_EMAIL
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-email
|
|
|
|
- name: GB_GIT_PASS
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-pass
|
|
|
|
- name: GB_SIGNING_KEY
|
|
|
|
value: /app/keys/signing-key.asc
|
|
|
|
- name: GB_SEQUENCE
|
|
|
|
value: "backup,restore"
|
|
|
|
volumeMounts:
|
|
|
|
- name: key-volume
|
|
|
|
mountPath: /app/keys
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
volumes:
|
|
|
|
- name: key-volume
|
|
|
|
secret:
|
|
|
|
secretName: gpg-key
|
|
|
|
restartPolicy: Never
|