2024-02-16 23:14:42 +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-02-17 13:41:05 +01:00
|
|
|
ttlSecondsAfterFinished: 1800
|
2024-02-16 23:14:42 +01:00
|
|
|
template:
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: grafana-backuper
|
2024-02-17 13:41:05 +01:00
|
|
|
image: git.ar21.de/yolokube/grafana-backuper:latest
|
2024-02-16 23:14:42 +01:00
|
|
|
env:
|
|
|
|
- name: GRAFANA_URL
|
|
|
|
value: "http://prometheus-grafana.prometheus"
|
|
|
|
- name: GRAFANA_AUTH_TOKEN
|
2024-02-17 13:41:05 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: grafana-secrets
|
|
|
|
key: grafana-auth-token
|
2024-02-16 23:14:42 +01:00
|
|
|
- name: GIT_REPO_URL
|
|
|
|
value: "https://git.ar21.de/yolokube/grafana-dashboards.git"
|
|
|
|
- name: GIT_USER
|
2024-02-17 13:41:05 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-user
|
|
|
|
- name: GIT_EMAIL
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-email
|
2024-02-16 23:14:42 +01:00
|
|
|
- name: GIT_PASS
|
2024-02-17 13:41:05 +01:00
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: git-secrets
|
|
|
|
key: git-pass
|
2024-02-16 23:14:42 +01:00
|
|
|
- name: GIT_SIGNING_KEY
|
2024-02-17 13:41:05 +01:00
|
|
|
value: /app/keys/signing-key.asc
|
|
|
|
volumeMounts:
|
|
|
|
- name: key-volume
|
|
|
|
mountPath: /app/keys
|
2024-02-16 23:14:42 +01:00
|
|
|
imagePullPolicy: IfNotPresent
|
2024-02-17 13:41:05 +01:00
|
|
|
volumes:
|
|
|
|
- name: key-volume
|
|
|
|
secret:
|
|
|
|
secretName: gpg-key
|
|
|
|
restartPolicy: Never
|