cfme-backup-job.yaml 733 B

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