woodpecker
woodpecker copied to clipboard
K8S backend new behavior when storage rwx is `false`
Clear and concise description of the problem
When we run a service
step or use the depends_on
(run parallel steps) and a storage RWX is set to false
, sometimes pipelines get stuck when the steps (pods) run in another node.
We get the error to mount the volumes.
Warning FailedMount 19s kubelet Unable to attach or mount volumes: unmounted volumes=[wp-01hmhhfewr9cwqsj2q4v440rwa-0-default], unattached volumes=[aws-iam-token wp-01hmhhfewr9cwqsj2q4v440rwa-0-default
This is expected because of the way Kubernetes works.
Suggested solution
My suggested solution is to add a PodAffinity
in the podSpec configuration when the storage RWX is false
it will force it to run the in the same node.
Alternative
Another solution is to set the pods to use emptyDir volumes.
Additional context
No response