Skip to content

Add Mount Propagation Option for K8s Runners Configuration

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do?

This MR adds mountPropagation as an option for KubernetesPVC.

Why was this MR needed?

This MR will help clean up the configuration for our GitLab Runners deployment. Currently, we are using runners.kubernetes.pod_spec in our configuration as the mountPropagation option is not available. If we have the mountPropagation option, we can use runners.kubernetes.volumes.pvc and simply our GitLab Runners configuration.

What's the best way to test this MR?

The following configuration can be used to test this change:

[[runners.kubernetes.volumes.pvc]]
    name = "volume-name"
    mount_path = "/volume-path"
    mount_propagation = "HostToContainer"
    read_only = true

This change was tested in our development cluster and seemed to work well. Looking forward for any suggestions or changes!

What are the relevant issue numbers?

#4767

Edited by 🤖 GitLab Bot 🤖

Merge request reports