MCPcopy Index your code
hub / github.com/buildkite/agent-stack-k8s

github.com/buildkite/agent-stack-k8s @v0.44.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.44.0 ↗ · + Follow
671 symbols 2,103 edges 63 files 364 documented · 54%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Buildkite Agent Stack for Kubernetes

Build status

Overview

The Buildkite Agent Stack for Kubernetes (also known as agent-stack-k8s) is a Kubernetes controller that uses the Buildkite Agent API to watch for scheduled jobs assigned to the controller's queue.

[!NOTE] Starting with v0.28.0, the Buildkite GraphQL API is no longer used. If you are upgrading from an older version, your GraphQL-enabled token can be safely removed from your configuration or Kubernetes secret. Only the Agent token is required.

Requirements

Usage

The simplest way to launch a stack on the default queue:

helm install agent-stack-k8s oci://ghcr.io/buildkite/helm/agent-stack-k8s \
    --set agentToken=<buildkite-agent-token>

To specify a non-default queue:

helm install agent-stack-k8s oci://ghcr.io/buildkite/helm/agent-stack-k8s \
    --set agentToken=<buildkite-agent-token> \
    --set config.queue=arm64

Full instructions can be found in the documentation.

Documentation

Comprehensive documentation for the Buildkite Agent Stack for Kubernetes controller can be found in the Agent Stack for Kubernetes section of the Buildkite Docs.

Development

For guidelines and requirements regarding contributing to the Buildkite Agent Stack for Kubernetes controller, please see the Development guide.

Extension points exported contracts — how you extend this code

JobHandler (Interface)
JobHandler implementations can handle one jobs. [4 implementers]
internal/controller/model/model.go
ManyJobHandler (Interface)
ManyJobHandler implementations can handle batches of jobs. [3 implementers]
internal/controller/model/model.go

Core symbols most depended-on inside this repo

Error
called by 88
api/agent_client.go
NewGraphQLClient
called by 48
internal/integration/api/graphql_client.go
New
called by 23
internal/controller/scheduler/scheduler.go
buildConfig
called by 22
cmd/controller/controller.go
Build
called by 21
internal/controller/scheduler/scheduler.go
ParseJob
called by 20
internal/controller/scheduler/scheduler.go
Add
called by 19
internal/controller/model/fake_scheduler.go
setEnvOpt
called by 15
internal/controller/config/config.go

Shape

Method 336
Function 212
Struct 113
Interface 5
TypeAlias 5

Languages

Go100%

Modules by API surface

internal/integration/api/generated.go257 symbols
internal/integration/integration_test.go47 symbols
internal/controller/scheduler/scheduler_test.go30 symbols
internal/controller/scheduler/pod_watcher.go29 symbols
api/agent_client.go28 symbols
internal/integration/testcase_test.go23 symbols
internal/controller/scheduler/job_watcher.go20 symbols
internal/controller/scheduler/scheduler.go18 symbols
internal/controller/limiter/limiter.go14 symbols
internal/controller/config/agent_config.go12 symbols
cmd/controller/flags.go10 symbols
internal/controller/scheduler/batch_buildkite_job_checker.go9 symbols

For agents

$ claude mcp add agent-stack-k8s \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact