Skip to content

kubernetes: add support for persistent volume claim volumes #422

Closed
@d4l3k

Description

@d4l3k

Description

Add support for PersistentVolumeClaim mounts to Kubernetes scheduler.

Motivation/Background

#420 adds bindmounts to K8S, we want to add in persistent volume claims for Kubernetes which will let us support most of the other remote mounts.

Detailed Proposal

Add a new mount type to specs:

class MountTypes(Enum):
    PERSISTENT_CLAIM = "persistent-claim"
    BIND = "bind"

class PersistentClaimMount(Mount):
    name: str
    dst_path: str
    read_only: bool = False

class Role:
    ...
    mounts: List[Union[BindMount,PersistentClaimMount]]

Add a new format to parse_mounts:

--mounts bind=persistent-claim,name=foo,dst=/foo[,readonly]

Alternatives

Users can already mount a volume on the host node and then bind mount it into kubernetes pod but this violates some isolation principles and can be an issue from a security perspective. It also is a worse experience for users since the mounts need to be mounted on ALL hosts.

Additional context/links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions