miq-restore-job.yaml 901 B

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