Pre-population of persistent storage volumes
A method includes populating a physical storage volume associated with a second PVC from a data source identified by a first PVC and in response to populating the physical storage volume, associating the physical storage volume with the first PVC.
1. A method comprising:
populating, by a processing device, a physical storage volume associated with a second persistent volume claim (PVC) from a data source identified by a first PVC; and
in response to populating the physical storage volume, associating, by the processing device, the physical storage volume with the first PVC.
2. The method of claim 1 , further comprising:
generating, by a populator controller, the second PVC as a temporary PVC with a same size as the first PVC.
3. The method of claim 2 , further comprising:
creating, by the populator controller, a populator pod to populate the physical storage volume from the data source identified by the first PVC.
4. The method of claim 1 , wherein the second PVC is populated in a second namespace for populating storage volumes of a container-orchestration system.
5. The method of claim 1 , further comprising:
rebinding the physical storage volume from the second PVC to the first PVC, wherein the first PVC and the second PVC are in a same namespace.
6. The method of claim 1 , further comprising:
in response to associating the physical storage volume with the first PVC, executing an application using the first PVC.
7. The method of claim 1 , further comprising:
identifying population instructions to populate the physical storage volume in view of a type of the data source; and
executing the population instructions to populate the physical storage volume with data from the data source.
8. A system comprising:
a memory; and
a processing device operatively coupled to the memory, the processing device to:
populate a physical storage volume associated with a second persistent volume claim (PVC) from a data source identified by a first PVC; and
in response to populating the physical storage volume, associate the physical storage volume with the first PVC.
9. The system of claim 8 , wherein the processing device is further to:
generate, by a populator controller, the second PVC as a temporary PVC with a same size as the first PVC.
10. The system of claim 9 , wherein the processing device is further to:
create, by the populator controller, a populator pod to populate the physical storage volume from the data source identified by the first PVC.
11. The system of claim 8 , wherein the second PVC is populated in a second namespace for populating storage volumes of a container-orchestration system.
12. The system of claim 8 , wherein the processing device is further to:
rebind the physical storage volume from the second PVC to the first PVC, wherein the first PVC and the second PVC are in a same namespace.
13. The system of claim 8 , wherein the processing device is further to:
in response to associating the physical storage volume with the first PVC, execute an application using the first PVC.
14. The system of claim 8 , wherein the processing device is further to:
identify population instructions to populate the physical storage volume in view of a type of the data source; and
execute the population instructions to populate the physical storage volume with data from the data source.
15. A non-transitory computer-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:
populate a physical storage volume associated with a second persistent volume claim (PVC) from a data source identified by a first PVC; and
in response to populating the physical storage volume, associate the physical storage volume with the first PVC.
16. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:
generate, by a populator controller, the second PVC as a temporary PVC with a same size as the first PVC.
17. The non-transitory computer-readable storage medium of claim 16 , wherein the processing device is further to:
create, by the populator controller, a populator pod to populate the physical storage volume from the data source identified by the first PVC.
18. The non-transitory computer-readable storage medium of claim 15 , wherein the second PVC is populated in a second namespace for populating storage volumes of a container-orchestration system.
19. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:
rebind the physical storage volume from the second PVC to the first PVC, wherein the first PVC and the second PVC are in a same namespace.
20. The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is further to:
in response to associating the physical storage volume with the first PVC, execute an application using the first PVC.