miq-backup-job.yaml 683 B

12345678910111213141516171819202122232425262728
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: manageiq-backup
  5. spec:
  6. template:
  7. metadata:
  8. name: manageiq-backup
  9. spec:
  10. containers:
  11. - name: postgresql
  12. image: docker.io/manageiq/postgresql:latest
  13. command:
  14. - "/opt/manageiq/container-scripts/backup_db"
  15. env:
  16. - name: DATABASE_URL
  17. valueFrom:
  18. secretKeyRef:
  19. name: manageiq-secrets
  20. key: database-url
  21. volumeMounts:
  22. - name: miq-backup-vol
  23. mountPath: "/backups"
  24. volumes:
  25. - name: miq-backup-vol
  26. persistentVolumeClaim:
  27. claimName: manageiq-backup
  28. restartPolicy: Never