Closed calvinbui closed 6 months ago
Thanks for raising this @calvinbui. We think it's a good idea to be able to do this. We've added this to our roadmap, but we're unable to commit to a timeline at this stage. In the meantime, a PR that plumbs this from the helm chart into the controller's config into these lines of code would be welcome.
Hi, the pull request https://github.com/buildkite/agent-stack-k8s/pull/262 will make ti configurable easier 💯
works so much better and faster now, that I think IfNotPresent
should be the default.
my change:
"pod-spec-patch":
"containers":
- "imagePullPolicy": "IfNotPresent"
"name": "agent"
- "imagePullPolicy": "IfNotPresent"
"name": "checkout"
- "imagePullPolicy": "IfNotPresent"
"name": "container-0"
"initContainers":
- "imagePullPolicy": "IfNotPresent"
"name": "copy-agent"
It is currently set to
Always
which slows down our builds when the image is already present on the host.For example, it already pulled the image for
copy-agent
init container, but then has to pull it again for thecheckout
andagent
containers.This also includes the job/step container.
https://github.com/buildkite/agent-stack-k8s/blob/3bf9caa15f922ca9e2ede89da272414c145796d8/internal/controller/scheduler/scheduler.go#L243
https://github.com/buildkite/agent-stack-k8s/blob/3bf9caa15f922ca9e2ede89da272414c145796d8/internal/controller/scheduler/scheduler.go#L315