weitere implementierung
This commit is contained in:
34
k8s/base/database/restore-cronjob.yaml
Normal file
34
k8s/base/database/restore-cronjob.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: timescale-restore-test
|
||||
namespace: database
|
||||
spec:
|
||||
schedule: "0 4 * * *" # täglich 04:00
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
containers:
|
||||
- name: restore-test
|
||||
image: bitnami/kubectl:latest
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
kubectl apply -f /manifests/restore-test.yaml
|
||||
sleep 300
|
||||
|
||||
kubectl get pods -n database
|
||||
|
||||
echo "✅ Restore Test executed"
|
||||
|
||||
kubectl delete cluster timescale-restore-test -n database || true
|
||||
volumeMounts:
|
||||
- name: manifests
|
||||
mountPath: /manifests
|
||||
volumes:
|
||||
- name: manifests
|
||||
configMap:
|
||||
name: restore-test-manifest
|
||||
Reference in New Issue
Block a user