Environment:SeldonIO Seldon core Go Build Toolchain Environment
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Development |
| Last Updated | 2026-02-13 14:00 GMT |
Overview
Go 1.24 build toolchain with controller-gen, kustomize, golangci-lint, and protoc for building Seldon Core 2 operator, scheduler, and hodometer from source.
Description
This environment provides the full Go development stack for building and contributing to Seldon Core 2 core components. The operator, scheduler, hodometer, agent, model gateway, pipeline gateway, and CLI are all written in Go. Building from source requires Go 1.24.0 (toolchain 1.24.4), controller-gen for CRD generation, kustomize for Kubernetes manifest customization, golangci-lint for code quality, and protoc for gRPC protocol buffer compilation. Docker is required for building container images.
Usage
Use this environment for building Seldon Core 2 from source, contributing code changes, or creating custom Docker images. It is not required for deploying pre-built Helm charts or Docker images.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS | Windows not officially supported for Go builds |
| Go | 1.24.0 (toolchain 1.24.4) | Required by all go.mod files |
| Memory | 4Gi minimum | Go compiler + linters are memory-intensive |
| Disk | 10Gi free | Go module cache + Docker image builds |
Dependencies
System Packages
- `go` >= 1.24.0 (toolchain 1.24.4)
- `make` (build automation)
- `docker` (container image builds)
- `git` (version control)
- `protoc` (Protocol Buffer compiler, for API generation)
Go Tools
- `controller-gen` v0.18.0 (CRD and RBAC manifest generation)
- `kustomize` v5.2.1 (Kubernetes resource customization)
- `golangci-lint` v1.64.8 (Go linter suite)
- `kubebuilder` envtest v1.23 (Kubernetes integration tests)
Key Go Module Dependencies
- `github.com/confluentinc/confluent-kafka-go/v2` v2.10.1
- `k8s.io/api` v0.33.2
- `k8s.io/apimachinery` v0.33.2
- `k8s.io/client-go` v0.33.2
- `sigs.k8s.io/controller-runtime` v0.21.0
- `google.golang.org/grpc` v1.73.0
- `google.golang.org/protobuf` v1.36.6
- `go.opentelemetry.io/otel` v1.37.0
Credentials
No credentials required for local builds.
For Docker image pushes:
- `DOCKER_USERNAME`: Docker Hub or registry username
- `DOCKER_PASSWORD`: Docker Hub or registry password
Quick Install
# Install Go 1.24
wget https://go.dev/dl/go1.24.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.24.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
# Install tools (from operator directory)
cd operator
make controller-gen kustomize
# Install golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
# Build all components
make build
Code Evidence
Go version requirement from `operator/go.mod:3`:
go 1.24.0
toolchain go1.24.4
Tool versions from `operator/Makefile`:
CONTROLLER_TOOLS_VERSION ?= v0.18.0
KUSTOMIZE_VERSION ?= v5.2.1
ENVTEST_K8S_VERSION = 1.23
GOLANGCI_LINT_VERSION ?= v1.64.8
Key dependencies from `scheduler/go.mod`:
require (
github.com/confluentinc/confluent-kafka-go/v2 v2.10.1
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/envoyproxy/go-control-plane v0.13.4
go.opentelemetry.io/otel v1.37.0
google.golang.org/grpc v1.73.0
)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `go: go.mod requires go >= 1.24.0` | Go version too old | Install Go 1.24.0+ from golang.org |
| `controller-gen: command not found` | controller-gen not installed | Run `make controller-gen` in operator directory |
| `confluent-kafka-go build failure` | Missing librdkafka C library | Install `librdkafka-dev` (Ubuntu) or use Go build tags |
| `golangci-lint timeout` | Lint run exceeds default timeout | Increase timeout: `golangci-lint run --timeout 5m` |
Compatibility Notes
- confluent-kafka-go: Requires CGo and librdkafka. On some systems, you may need to install C development headers.
- Docker builds: Use multi-stage Dockerfiles; build stage uses `golang:1.24-bullseye` (scheduler) or `golang:1.24-alpine` (agent, proxy).
- Final images: All production images use `registry.access.redhat.com/ubi9/ubi-micro:9.6` as the base (minimal, non-root).