Skip to content

Add NFS volume support to the kubernetes executor

What does this MR do?

Adds support to the kubernetes executor for NFS volumes (https://kubernetes.io/docs/concepts/storage/volumes/#nfs)

Why was this MR needed?

The need arose when trying to configure volume mounts for pods in dynamic namespaces (https://docs.gitlab.com/runner/executors/kubernetes.html#overwriting-kubernetes-namespace). The configuration we use for spinning up CI-specific namespaces is to set the name we need, and use the (NamespaceAutoProvision)[https://kubernetes.io/docs/admin/admission-controllers/#namespaceautoprovision] admission controller to automatically create the namespace. We also have shared caches on NFS that are needed during builds. We could use a PVC, but since these are throwaway namespaces the complexity involved in setting it up is not really justified. Since there are already several other volume types supported it seems trivial to simply support one more.

Are there points in the code the reviewer needs to double check?

No.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

Link to related issue

#2943 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading