buildkite / agent-stack-k8s

Spin up an autoscaling stack of Buildkite Agents on Kubernetes
MIT License
78 stars 30 forks source link

configure agent images without updating controller with the "image" value #138

Open andrewlarry opened 1 year ago

andrewlarry commented 1 year ago

I'd like to add custom hooks to the agent image without updating the controller pod. I notice that when I deploy with --set image=my-custom-image:latest, the controller gets redeployed with my image. This was unexpected based on the help text.

--image string The image to use for the Buildkite agent (default "ghcr.io/buildkite/agent-k8s:latest")

Is that behavior intentional? And is there a recommended approach for customizing the agent images?

benmoss commented 1 year ago

You want to use --set config.image instead of --set image. All the Helm values that start with config will go through to the controller's configuration, but anything that's top-level is values for the controller deployment itself. Sorry if that's a bit confusing.

andrewlarry commented 1 year ago

Works as expected with --set config.image. Thanks for the help.

The help text is a bit misleading. "The image to use for the controller" seems more accurate.

benmoss commented 1 year ago

The help text from here? I agree, that's a vestige of a time from before the Helm chart, those are the CLI options for the controller binary.

andrewlarry commented 1 year ago

Ok, agent-stack-k8s --help makes more sense now. I though "Options" was a continuation of the "Deploy with Helm" section.

bpoland commented 6 months ago

Hey were you able to get your hooks working? I just figured out a way but not sure if I missed something!

https://github.com/buildkite/agent-stack-k8s/pull/258