VolumeBuilder¶
- class controller.services.builder.volumes.VolumeBuilder¶
Bases:
object
Construct Kubernetes objects for volumes and volume mounts.
This is broken into its own class since it is used when constructing both labs and fileservers.
Methods Summary
build_mounts
(mounts[, prefix])Construct volume mounts for configured volumes.
build_volumes
(volumes, pvc_prefix)Construct Kubernetes
V1Volume
objects for configured volumes.Methods Documentation
- build_mounts(mounts, prefix='')¶
Construct volume mounts for configured volumes.
- Parameters:
volumes – Configured volumes.
prefix (
str
, default:''
) – Prefix to prepend to all mount paths, if given.mounts (
Iterable
[VolumeMountConfig
])
- Returns:
List of volumes and mounts.
- Return type:
list of kubernetes_asyncio.client.models.V1VolumeMount
- build_volumes(volumes, pvc_prefix)¶
Construct Kubernetes
V1Volume
objects for configured volumes.- Parameters:
volumes (
Iterable
[VolumeConfig
]) – Configured volumes.pvc_prefx – Prefix to add to the names of persistent volume claims. The name of the claim will be followed by
-pvc-
and the name of the volume.pvc_prefix (
str
)
- Returns:
List of Kubernetes
V1Volume
objects.- Return type:
list of kubernetes_asyncio.client.models.V1Volume