We are running drone v1.0.0 in Kubernetes with Github. We have a bunch of services and steps defined in a pipeline for end to end testing.
Our service containers seem mount the source code (/drone/src) and use the source code path as their working dir when executing
commands. This makes it a bit cumbersome to write custom commands in services because I need to change the working dir manually, and to do that I need to look up the Dockerfile for the services I’m using.
The source code mounting also seems to make Kubernetes schedule everything on the same node. This causes problems for us when the selected node cannot fit all steps and services. Currently we have are many builds that just halt forever because Kubernetes is not able to schedule all steps and services on the same node. I think this can be partially solved by making services not need to mount the same volume as the steps, since they can then be scheduled on another node.
The build tasks that halt have pods get the following errors:
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 2m29s (x2017 over 10h) default-scheduler 0/12 nodes are available: 1 NodeUnschedulable, 1 PodToleratesNodeTaints, 11 MatchNodeSelector, 2 Insufficient cpu.
Edit: it seems that the reason for all services and steps are run on the same node is that KUBERNETES_NODE env variable is equal to the node the drone-job is run on. Maybe this node selector does not need to be used for services, but only steps?