cfme-restore-job.yaml 950 B

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