Guest User

Untitled

a guest
Sep 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. ---
  2.  
  3. # A minimal OpenShift template
  4. # to create a BusyBox container with
  5. # a volume claim that can be used to
  6. # launch a Job and inspect a PVC.
  7. #
  8. # Create with:
  9. # oc process -p PVC_CLAIM_NAME=my-claim -f busy-job.yaml | oc create -f -
  10. # Destroy with:
  11. # oc delete job --selector template=busy-job
  12.  
  13. kind: Template
  14. apiVersion: v1
  15. metadata:
  16. name: busy-job
  17. labels:
  18. template: busy-job
  19.  
  20. parameters:
  21.  
  22. - name: PVC_CLAIM_NAME
  23. value: busy-job-claim
  24.  
  25. objects:
  26.  
  27. - kind: Job
  28. apiVersion: batch/v1
  29. metadata:
  30. name: busy-job
  31. spec:
  32. replicas: 1
  33. selector:
  34. name: busy-job
  35. template:
  36. metadata:
  37. labels:
  38. name: busy-job
  39. spec:
  40. containers:
  41. - image: busybox
  42. name: busy-job
  43. command:
  44. - "sh"
  45. - "-c"
  46. - "tail -f /dev/null"
  47. volumeMounts:
  48. - name: busy-job-vol
  49. mountPath: /test
  50. volumes:
  51. - name: busy-job-vol
  52. persistentVolumeClaim:
  53. claimName: ${{PVC_CLAIM_NAME}}
  54. restartPolicy: Never
Add Comment
Please, Sign In to add comment