Ability to configure the type of the volume for the agent in the kubernetes backend
Clear and concise description of the problem
Actually, woodpecker-agent creates a PersistentVolumeClaim for the mount of the /woodpecker directory that is shared between the pods (steps) of the same pipeline.
This is occured even if you have skip_clone: true for example a pipeline that notices a chat channel.
In case of a cluster processing a lot of pipelines (every pipeline generate a persistentVolumeClaim that will be destroyed at the end) these approach can overload the PersistentVolume backend of the Kubernetes cluster.
Suggested solution
Drone CI uses a disk-based emptyDir for the /drone directory that is shared to all steps in a pipeline.
Convert the initial PersistentVolumeClaim into a disk-based emptyDir.
Alternative
An alernative would be the ability to configure the type of the /woodpecker directory :
WOODPECKER_BACKEND_K8S_STORAGE_TYPE=(PersistentVolume|EmptyDir|MemEmptyDir)In this case the variable WOODPECKER_BACKEND_K8S_VOLUME_SIZE would be usefull for all the types.
Additional context
No response
Validations
- Checked that the feature isn't part of the
nextversion already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use] - Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Source: woodpecker-ci/woodpecker