2024-02-23 11:39:20 +01:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: grafana-backuper
|
|
|
|
---
|
|
|
|
apiVersion: batch/v1
|
|
|
|
kind: CronJob
|
|
|
|
metadata:
|
|
|
|
name: grafana-backuper
|
|
|
|
namespace: grafana-backuper
|
|
|
|
spec:
|
|
|
|
schedule: "0 * * * *"
|
|
|
|
successfulJobsHistoryLimit: 1
|
|
|
|
failedJobsHistoryLimit: 3
|
|
|
|
jobTemplate:
|
|
|
|
spec:
|
2024-08-19 14:46:52 +02:00
|
|
|
ttlSecondsAfterFinished: 3600
|
2024-02-23 11:39:20 +01:00
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: grafana-backuper
|
|
|
|
image: git.ar21.de/yolokube/grafana-backuper:latest
|
|
|
|
env:
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GRAFANA_URL
|
2024-02-23 11:39:20 +01:00
|
|
|
value: "http://prometheus-grafana.prometheus"
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GRAFANA_TOKEN
|
2024-02-23 11:39:20 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: grafana-secrets
|
|
|
|
key: grafana-auth-token
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GIT_REPO
|
2024-02-23 11:39:20 +01:00
|
|
|
value: "https://git.ar21.de/yolokube/grafana-dashboards.git"
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GIT_BRANCH
|
|
|
|
value: "main"
|
|
|
|
- name: GB_GIT_USER
|
2024-02-23 11:39:20 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-user
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GIT_EMAIL
|
2024-02-23 11:39:20 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-email
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_GIT_PASS
|
2024-02-23 11:39:20 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-pass
|
2024-08-19 14:46:52 +02:00
|
|
|
- name: GB_SIGNING_KEY
|
2024-02-23 11:39:20 +01:00
|
|
|
value: /app/keys/signing-key.asc
|
|
|
|
volumeMounts:
|
|
|
|
- name: key-volume
|
|
|
|
mountPath: /app/keys
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
volumes:
|
|
|
|
- name: key-volume
|
|
|
|
secret:
|
|
|
|
secretName: gpg-key
|
|
|
|
restartPolicy: Never
|