Skip to content

How to create PersistantVolume (ReadWriteOnce) on the node that runs the workflow? (Kubernetes backend) #3068

Closed Answered by zc-devs
itytophile asked this question in Ask a Question
Discussion options

You must be logged in to vote

K3s v1.29.0+k3s1, 3 nodes
Woodpecker 2.2.2, 1 server, 1 agent with max workflows 4

I ran pipeline four times

and workflows were spawned across three nodes

At start of pipeline workspace volume is created. Then repository cloned into it. Then it mounts into each step also.
Volume is created on node, where first pod runs (binding). Rest of the pods are scheduled on the same node due to affinity, that LocalPathProvisioner sets.
So, seems works as intended.

I've set the nodeSelector option in woodpecker.yml to force the workflow to run on the node I want. The newly created pod wants to run on the good node but the PersistantVolume is created on the other node.

That also seems logical. Loc…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pat-s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants