#1594·woodpecker

Ability to configure the type of the volume for the agent in the kubernetes backend

Author: babykartCreated Mar 2, 2023Updated Sep 30, 2026
Labelsenhancementbackend/kubernetes

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

Source: woodpecker-ci/woodpecker