You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Container components can specify mountSources: true to enable mounting the project repos into the container. Currently, sources are mounted at the path /projects, which leave the potential for a collision if a devfile specifies volumeMount to /projects directly -- e.g. the DevWorkspace
is at least ambiguous -- default behaviour would be to provision a container with conflicting volumeMounts on the /projects path.
Required Changes
Option 1
Use random mountPath (based on workspace UID) for mountSources and expect editors, etc. to respect $PROJECTS_ROOT env var.
Option 2
Specify that /projects is a reserved volumeMount path, (unless mountSources is explicitly false?)
Relevant API docs
The API documentation for mountSources:
mountSources: boolean
Toggles whether or not the project source code should be mounted in the component.
Defaults to true for all component types except plugins and components that set dedicatedPod to true.
The API documentation for volumeMounts:
// Volume that should be mounted to a component containertypeVolumeMountstruct {
// The volume mount name is the name of an existing `Volume` component.// If several containers mount the same volume name// then they will reuse the same volume and will be able to access to the same files.Namestring`json:"name"`// The path in the component container where the volume should be mounted.// If not path is mentioned, default path is the is `/<name>`.// +optionalPathstring`json:"path,omitempty"`
}
The text was updated successfully, but these errors were encountered:
Optional specification of the path in the container where project sources should be transferred/mounted when mountSources is true. When omitted, the default value of /projects is used.
which implies option 1 in the original description; it should be specified that the value used for sourceMapping cannot be used as a mount path for any VolumeMounts or it will result in a collision.
Description
Container components can specify
mountSources: true
to enable mounting the project repos into the container. Currently, sources are mounted at the path/projects
, which leave the potential for a collision if a devfile specifies volumeMount to/projects
directly -- e.g. the DevWorkspaceis at least ambiguous -- default behaviour would be to provision a container with conflicting volumeMounts on the
/projects
path.Required Changes
Option 1
mountSources
and expect editors, etc. to respect$PROJECTS_ROOT
env var.Option 2
/projects
is a reserved volumeMount path, (unlessmountSources
is explicitlyfalse
?)Relevant API docs
The API documentation for
mountSources
:The API documentation for
volumeMounts
:The text was updated successfully, but these errors were encountered: