Enabling builds with local SSDs on GKE

We're using Kaniko on GitLab CI/CD with a Kubernetes runner in GKE (using the official GitLab Runner Helm Chart). This works great and allows us to parallelize builds, use a cache repo and disable privileged mode on the runner pods.

However, we build many react applications and they take a long time to build, even with caching enabled. We've successfully identified disk throughput as the bottleneck on those jobs, so we changed the nodes' bootdisk to SSDs. This was a great improvement, but is still reaching the network throughput limits (persistent disks in GCP are networked).

GCP provides local SSDs in order to avoid the network limits entirely, which seems ideal for GitLab jobs as we don't have any durability requirements. But the local SSDs get mounted inside a specific folder in the node (/mnt/disks/ or something like that) and I wasn't able to find documentation on how to take advantage of them. We understand we need to accomplish three steps:

  • mount the SSD as a volume inside the job pod

  • tell the runner to checkout the repository (and run the job) inside that dir

  • tell kaniko to make all the work inside that dir

Any hints on that? Has someone achieved something similar? Thanks in advance.

Disclaimer: I know this is probably not a good "issue" because nothing is broken (and also this isn't a feature request, unless this is impossible to achieve right now). I just didn't know where else to ask the question. Feel free to close this.

Edited Sep 23, 2020 by Laski
Assignee Loading
Time tracking Loading