Skip to content

Instantly share code, notes, and snippets.

@gitlawr
Created November 23, 2018 05:11
Show Gist options
  • Save gitlawr/72b9b30e833f62c18fee3a7670f23174 to your computer and use it in GitHub Desktop.
Save gitlawr/72b9b30e833f62c18fee3a7670f23174 to your computer and use it in GitHub Desktop.
Pipeline volume support

Pipeline Volume Support

Background

We've got users constantly asking for caching files between pipeline builds. Currently, when a build is finished, the build pod will be removed and all intermediate files are ephemeral. For instance, when a maven build is done the second time, users would like to have local cache and do not need to fetch dependencies again. They can setup private maven repository now to speed up the process but it still causes additional network traffic and extra time.

Design Proposal

For multi-tenancy we don't want to support host-path volume, and we don't need dynamic provisioning regarding pipeline usecases. So the plan is to support three volume types: existing PVCs/secrets/configmaps.

For PVCs, they are expected to set to ReadWriteMany access mode for concurrent builds.

Users Claims the pipeline volume in following format:

#pipeline file
...
volumes:
- secretName: s1
  mountPath: /path
- configmapName: c1
  mountPath: /path2
- pvcName: pvc1
  mountPath: /path3

For simplicity the volumes will be mounted to all containers in the build pod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment