Documentation
¶
Overview ¶
Package storage contains library functions for provisioning volumes and volumeMounts in containers according to the volume components in a devfile. These functions also handle mounting project sources to containers that require it.
TODO:
- Add functionality for generating PVCs with the appropriate size based on size requests in the devfile
- Devfile API spec is unclear on how mountSources should be handled -- mountPath is assumed to be /projects and volume name is assumed to be "projects" see issues:
- https://github.com/devfile/api/issues/290
- https://github.com/devfile/api/issues/291
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NeedsStorage ¶
func NeedsStorage(workspace devworkspace.DevWorkspaceTemplateSpec) bool
NeedsStorage returns true if storage will need to be provisioned for the current workspace. Note that ephemeral volumes do not need to provision storage
func RewriteContainerVolumeMounts ¶
func RewriteContainerVolumeMounts(workspaceId string, podAdditions *v1alpha1.PodAdditions, workspace devworkspace.DevWorkspaceTemplateSpec) error
RewriteContainerVolumeMounts rewrites the VolumeMounts in a set of PodAdditions according to the 'common' PVC strategy (i.e. all volume mounts are subpaths into a common PVC used by all workspaces in the namespace).
Also adds appropriate k8s Volumes to PodAdditions to accomodate the rewritten VolumeMounts.
Types ¶
This section is empty.