agent-stack-k8s icon indicating copy to clipboard operation
agent-stack-k8s copied to clipboard

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

Open andrewlarry opened this issue 3 years ago • 5 comments

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?

andrewlarry avatar Mar 07 '23 21:03 andrewlarry

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.

benmoss avatar Mar 08 '23 14:03 benmoss

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.

andrewlarry avatar Mar 08 '23 19:03 andrewlarry

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.

benmoss avatar Mar 08 '23 21:03 benmoss

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

andrewlarry avatar Mar 09 '23 15:03 andrewlarry

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

bpoland avatar Feb 23 '24 18:02 bpoland