Skip to content

Conversation

@DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented May 12, 2025

Description

Reduce Kubernetes resource size (when using agent-stack-k8s) by applying more environment variables from the socket.

Context

A customer had feedback that having a lot of env vars repeated across containers in the pod spec can consume a lot of space in etcd.

Changes

  • Add a kubernetes-bootstrap subcommand. This allows fetching the env vars from the socket before the bootstrap subcommand runs, which was the fatal flaw in commit 36940e5
  • Filter out the kubernetes plugin when creating the bootstrap env
  • Some small-scale refactoring of flags and env helpers

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

@DrJosh9000 DrJosh9000 force-pushed the kubernetes-rebootstrap branch 2 times, most recently from 559d47b to 3534225 Compare May 13, 2025 00:58
@DrJosh9000 DrJosh9000 force-pushed the kubernetes-rebootstrap branch 6 times, most recently from d47933c to 757eec4 Compare May 13, 2025 07:23
@DrJosh9000 DrJosh9000 changed the title [WIP] Add kubernetes-bootstrap Add kubernetes-bootstrap May 13, 2025
@DrJosh9000 DrJosh9000 marked this pull request as ready for review May 13, 2025 07:37
@DrJosh9000 DrJosh9000 force-pushed the kubernetes-rebootstrap branch from 757eec4 to 1aa6d2a Compare May 13, 2025 07:57
Copy link
Contributor

@CerealBoy CerealBoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a small question about the default config setup, otherwise LGTM!

@DrJosh9000 DrJosh9000 merged commit d7b5d23 into main May 14, 2025
1 check passed
@DrJosh9000 DrJosh9000 deleted the kubernetes-rebootstrap branch May 14, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants