config

package
v0.138.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config holds the lab configuration: everything the interactive form asks for, persisted to agentlab.yaml so re-runs are reproducible.

Index

Constants

View Source
const (
	// ModelManagerBackendOllama is a host Ollama.
	ModelManagerBackendOllama = "ollama"
	// ModelManagerBackendLemonade is a host Lemonade Server
	// (lemonade-server.ai): FastFlowLM on AMD Ryzen AI NPUs, llama.cpp on
	// GPU and CPU, behind one OpenAI-compatible API plus a management API.
	ModelManagerBackendLemonade = "lemonade"
	// ModelManagerBackendLMStudio is a host LM Studio (lmstudio.ai):
	// llama.cpp on GPU and CPU, MLX on Apple silicon, behind one
	// OpenAI-compatible API plus its own /api/v1. Needs 0.4.0 or newer, and
	// it cannot delete a model — that is `lms rm` on the host.
	ModelManagerBackendLMStudio = "lmstudio"
)

The model servers the lab runs against on the host, which model-manager and agent pods reach through the kind docker network's gateway.

View Source
const (
	OllamaPort   = 11434
	LemonadePort = 13305
	LMStudioPort = 1234
)

The servers' default API ports, the ones the autodetected endpoints assume.

View Source
const (
	GroupTenantA = "tenant-a"
	GroupTenantB = "tenant-b"
)

The lab groups are a fixed vocabulary: RBAC binds the first three to cluster-admin / edit-in-demo / view (see the rbac template). The two tenant groups the lab binds nothing to: `agentlab tenants-test` binds each to agent-platform:user in one organization namespace, so a token's groups claim is what gives its person that tenant.

View Source
const (
	KubernetesClientID     = "kubernetes"
	KubernetesClientSecret = "kubernetes-lab-secret" // #nosec G101 -- static throwaway lab credential, by design
	// The ONE platform client, following the chart's global.identity
	// convention: muster and Backstage authenticate with the same Dex client,
	// so a token minted for either carries an audience the other trusts.
	AgentPlatformClientID     = "agent-platform"
	AgentPlatformClientSecret = "agent-platform-lab-secret" // #nosec G101 -- static throwaway lab credential, by design
	// An audience-only client: Giant Swarm apiservers trust its id, and it
	// trusts agent-platform to request its audience. It never runs a flow.
	DexK8sAuthenticatorClientID = "dex-k8s-authenticator"
)

Static OAuth client IDs and secrets, paired per client. The IDs also appear in the templates (Dex staticClients and each consumer's own config), which must agree with these. The lab's identity is self-contained and throwaway by design; nothing here guards anything real.

View Source
const (
	DevImageClaudeHarness = CodingRuntimeClaude + "-harness"
	DevImageCodexHarness  = CodingRuntimeCodex + "-harness"
	DevImageOmpHarness    = CodingRuntimeOmp + "-harness"
)

DevImageClaudeHarness, DevImageCodexHarness and DevImageOmpHarness are the devImages keys of a coding Harness's image, `<runtime>-harness`: a build of the kagent line's claude-harness, codex-harness or omp-harness, say from a pull request. Like the `harness` target it is no Deployment: the lab pushes it to its registry and forwards the digest as the image of that runtime's kagent.harnesses entry. Meaningful only while the lab renders that Harness (CodingHarnessRendered).

View Source
const (
	CodingRuntimeClaude = "claude"
	CodingRuntimeCodex  = "codex"
	CodingRuntimeOmp    = "omp"
)

The coding runtimes the lab renders a Harness of, each named after its runtime: claude (Claude Code), codex (OpenAI's Codex CLI) and omp (oh-my-pi, a BYO Harness on the kagent line's omp-harness adapter).

View Source
const (
	WorkspaceProviderGitHub      = "github"
	WorkspaceProviderGitLab      = "gitlab"
	WorkspaceGitHubSecretName    = "workspace-github" // #nosec G101 -- Secret NAME, not a credential
	WorkspaceGitHubPrivateKeyKey = "private-key"      // #nosec G101 -- Secret KEY name, not a credential
	WorkspaceGitLabSecretName    = "workspace-gitlab" // #nosec G101 -- Secret NAME, not a credential
	WorkspaceGitLabTokenKey      = "token"            // #nosec G101 -- Secret KEY name, not a credential
	WorkspaceGitLabPasswordKey   = "person-password"  // #nosec G101 -- Secret KEY name, not a credential
)

The workspace providers, and the Secrets of their Apps: what the operator's secret tooling placed, which the values only ever reference.

View Source
const (
	WorkspaceStorageNFS      = "nfs"
	WorkspaceStorageHostPath = "hostpath"
	WorkspaceStorageMooseFS  = "moosefs"
)

The workspace storages platform.workspaces.storage names.

View Source
const (
	DefaultGitHubSecretName      = "github-oauth-client" // #nosec G101 -- Secret NAME, not a credential
	DefaultGitHubSecretNamespace = "agent-platform"
	GitHubClientIDKey            = "client-id"
	GitHubClientSecretKey        = "client-secret" // #nosec G101 -- Secret KEY name, not a credential
)

The OAuth client Secret platform.github reads by default, and the keys muster's clientCredentialsSecretRef reads it by (its own defaults).

View Source
const (
	DefaultGitHubSignInSecretName = "github-signin-client" // #nosec G101 -- Secret NAME, not a credential
	GitHubSignInSecretNamespace   = "dex"
	// GitHubSignInSecretEnv is the environment variable the Dex pod reads
	// the client secret as; the rendered connector references it
	// (`clientSecret: $GITHUB_SIGNIN_CLIENT_SECRET`), and Dex expands it.
	GitHubSignInSecretEnv = "GITHUB_SIGNIN_CLIENT_SECRET" // #nosec G101 -- env var NAME, not a credential
)

The client Secret platform.githubSignIn reads by default. It lives in the Dex namespace: the Dex pod reads it as an environment variable, which a pod can only do from a Secret of its own namespace.

View Source
const (
	ProviderOpenAI    = "OpenAI"
	ProviderAnthropic = "Anthropic"
	ProviderGemini    = "Gemini"
	ProviderOllama    = "Ollama"
)

The provider vocabulary for extra models, spelled exactly as the kagent ModelConfig CRD's provider enum spells them.

View Source
const (
	PortalAgentPlatform = "agent-platform"
	PortalClassic       = "classic"
)

The Backstage portal modes (backstage.portal).

View Source
const (
	// ChartChannelStable is a released chart, pinned by platform.chartVersion.
	ChartChannelStable = "stable"
	// ChartChannelDev is the dev channel: the newest dev build of
	// platform.chartBranch (or the one platform.chartPinned froze).
	ChartChannelDev = "dev"
	// ChartChannelPath is a chart directory, platform.chartPath.
	ChartChannelPath = "path"
)

The chart channels: where the meta chart the lab installs comes from.

View Source
const APIFormatResponses = "responses"

APIFormatResponses is openAI.apiFormat for the Responses API.

View Source
const BrowserCallbackPort = 5555

BrowserCallbackPort is the fixed local port for the OAuth callback of `agentlab login --browser` (and its hidden `agentlab browser` alias). Fixed because it must be pre-registered in Dex's redirectURIs.

View Source
const ChartRepository = "oci://gsoci.azurecr.io/charts/giantswarm/agent-platform"

ChartRepository is where the agent-platform chart releases live.

View Source
const ChatGPTLoginLabel = "kagent.dev/chatgpt-login"

ChatGPTLoginLabel opts a login Secret in to kagent's refresher, which rotates its tokens in place; kagent refuses a login Secret without it.

View Source
const ChatGPTLoginLabelValue = "true"

ChatGPTLoginLabelValue is ChatGPTLoginLabel's opt-in value.

View Source
const ChatGPTSubscriptionModelConfig = "chatgpt-subscription"

ChatGPTSubscriptionModelConfig is the ModelConfig the chart renders of a person's own ChatGPT login, "ChatGPT (your subscription)" in the portal.

View Source
const ConnectivityChartName = "agent-platform-connectivity"

ConnectivityChartName is the meta chart's wiring chart, published off the same tag as the meta chart and installed at its exact version (components.agent-platform-connectivity.releasedWithChart).

View Source
const CredentialTypeChatGPT = "chatgptOAuth" // #nosec G101 -- the CRD's enum value, no credential

CredentialTypeChatGPT is openAI.credentialType for a ChatGPT subscription login.

View Source
const DefaultAPIServerPort = 6443

DefaultAPIServerPort is the host port of the lab's Kubernetes API server when agentlab.yaml sets none.

View Source
const DefaultChartVersion = "4.173.8"

DefaultChartVersion is the agent-platform release the lab installs when agentlab.yaml pins none — the release this agentlab was verified with: the 4.x line (kagent API v2 with Agent Substrate and the platform Postgres shipped by the chart) on the upstream lines' own releases (kagent and Substrate `>=1.0.0 <1.1.0`, the agentgateway line's `2.0.0`). Bump deliberately, with a lab run: the lab never floats. A candidate must pin kagent and Substrate on one Substrate release (`helm show values` of the chart: components.kagent's range admits only kagent releases whose worker image is the major.minor components.substrate installs) — a chart that leaves the kagent range open across a Substrate release boots no golden actor (agentlab#187).

View Source
const DefaultChatGPTSubscriptionModel = "gpt-5.6-luna"

DefaultChatGPTSubscriptionModel is the model of a person's own ChatGPT login when platform.chatgptSubscription.model names none: one the ChatGPT Codex backend serves to a subscription.

View Source
const DefaultClusterName = "agentlab"

DefaultClusterName is a new lab's clusterName when no other lab on the machine holds it.

View Source
const DefaultDevRegistryPort = 5001

DefaultDevRegistryPort is the host port of the lab registry when agentlab.yaml sets none: kind's documented local-registry port.

View Source
const DefaultDevctlVersion = "8.156.0"

DefaultDevctlVersion is the devctl release whose chart the lab installs while platform.devctl.version is empty: the server and its binary share it.

View Source
const DefaultDexPort = 32000

DefaultDexPort is the lab Dex NodePort when agentlab.yaml sets none.

View Source
const DefaultGatewayAddress = "127.0.0.1"

DefaultGatewayAddress is where the edge is published without platform.gatewayAddress.

View Source
const DefaultGatewayPort = 443

DefaultGatewayPort is the edge's port when nothing else holds it.

View Source
const DevImageAgentgateway = "agentgateway"

DevImageAgentgateway is the devImages key of the agentgateway data plane: the Deployment `agentgateway`, container `agentgateway` — the proxy the agentgateway controller runs for the lab's Gateway. The controller creates that Deployment at run time from the image its chart hands it as registry, repository and tag (the chart's proxy.image values), so the lab forwards the ref through those values rather than as a post-renderer, and a digest ref — which the three fields cannot carry — is refused.

View Source
const DevImageAgentgatewayController = "agentgateway-controller"

DevImageAgentgatewayController is the devImages key of the agentgateway controller: the Deployment `agentgateway-controller`, container `controller`, rendered by the agentgateway component's chart.

View Source
const DevImageClusterManager = "cluster-manager"

DevImageClusterManager is the devImages key of the cluster-manager component: the Deployment `cluster-manager`, container `cluster-manager`. The meta chart ships the component off, and the lab has no other switch for it: naming its image here turns it on (ClusterManagerEnabled), with the lab's own values for it (the `kubernetes` audience its MCP server requires of the forwarded token).

View Source
const DevImageHarness = "harness"

DevImageHarness is the devImages key of the platform Harness's workload image — the Go ADK runtime every agent runs on under kagent API v2. Not a Deployment: the connectivity chart renders the image by digest into the `Harness` object, and Substrate's atelet pulls it from a registry into its own layer cache, so the lab pushes the local build to its registry (DevRegistryPort) and forwards the digest through kagent.harness.image.

View Source
const DevImageKlausGateway = "klaus-gateway"

DevImageKlausGateway is the devImages key of the klaus-gateway component (platform.klausGateway): the Deployment `klaus-gateway`, container `klaus-gateway`. Meaningful only while the component is on.

View Source
const DevImageMCPPrometheus = "mcp-prometheus"

DevImageMCPPrometheus is the devImages key of the lab's own mcp-prometheus (platform.observability): the Deployment `mcp-prometheus`, container `mcp-prometheus`, rendered by the HelmRelease the lab writes outside the meta chart (mcp-prometheus.yaml.tmpl), whose postRenderers carry the swap.

View Source
const DevImageSubstrateAPI = "ate-api-server"

DevImageSubstrateAPI is the devImages key of Agent Substrate's control plane API: the Deployment `ate-api-server`, container `ate-api-server`, rendered by the `substrate` component's chart — where the ActorTemplate reconciler and its golden snapshots live. Meaningful only with the agents, which bring Substrate.

View Source
const DevImageWorkspaceManager = "workspace-manager"

DevImageWorkspaceManager is the devImages key of the workspace-manager component: the Deployment `workspace-manager`, container `workspace-manager`. The component follows platform.workspaces.enabled, so the target is meaningful only while the workspaces are on.

View Source
const File = "agentlab.yaml"

File is the configuration file written next to the binary's working directory by `agentlab configure` and read by every other command.

View Source
const GatewayNodePort = 30443

GatewayNodePort is the fixed NodePort publishing the agentgateway edge (the chart-owned Gateway's HTTPS :443 listener) on the kind node. The data-plane Service is created by the agentgateway controller at run time — not part of the Helm release, so neither values nor a postRenderers patch can pin its NodePort. The lab renders its own selector-matched NodePort Service instead (gateway-nodeport.yaml.tmpl), pinned here so the kind port mapping has a stable node-side port. Host side: Platform.GatewayPort.

View Source
const GatewayPublicNodePort = 30444

GatewayPublicNodePort pins the NodePort of the edge Service's second port (platform.gatewayPort, rendered off 443 only) so the apiserver never picks one that collides with the other fixed NodePorts. Nothing on the host maps it.

View Source
const KagentUINodePort = 30880

KagentUINodePort is the fixed NodePort the kagent-ui Service is pinned to, so the kind port mapping (created once, at cluster creation) has a stable node-side port to publish. The kagent chart renders `ui.service.type` but no `nodePort` field, so the pin is a Kustomize patch in the kagent component's `postRenderers` (HACKS.md U9). A real Kubernetes NodePort, hence the 30000-32767 range; the host side is configurable via Platform.AgentsPort.

View Source
const MaxSubstrateNodes = 3

MaxSubstrateNodes bounds substrateNodes: every node is a container running its own kubelet and containerd on the host's memory, and a node-loss proof needs one node to lose and one to land on.

View Source
const ModelManagerBackendKServe = "kserve"

ModelManagerBackendKServe is the platform's own serving — KServe's LLMInferenceService on llm-d, composed by model-manager from a published ServingPreset — and no host server: nothing answers on a port of this machine, so it is not in ModelManagerBackends, which `agentlab configure` fills from what does. The serving switch (Platform.Serving) adds it to the list the chart's model-manager fronts (Config.ChartBackends).

View Source
const MusterNodePort = 8090

MusterNodePort is the port muster's aggregator binds on the kind node (hostNetwork). It is the muster chart's default listen port, not a lab choice: in-node consumers (Backstage) always dial localhost:8090, while the host-side port mapping is configurable via Platform.MusterPort.

View Source
const SubstrateNodeKey = "agentlab.giantswarm.io/substrate-worker"

SubstrateNodeKey is the label and the NoSchedule taint (value "true") of the substrateNodes workers.

View Source
const WorkspaceGrantProviderApps = "apps"

WorkspaceGrantProviderApps is the grantProvider that pins no instance: one muster provider App per instance, side by side.

View Source
const WorkspaceOrganization = "lab"

WorkspaceOrganization is the lab's one workspace-manager Organization, the owner of every workspace a lab user creates (the namespace org-<name> is the fleet-shaped org namespace the lab also carries). WorkspaceOrganizationGroups are the lab Dex groups whose users are its members: the platform admins and the developers. The viewers stay outside, so the workspace tools refuse them as not a member.

Variables

View Source
var APIFormats = []string{"chatCompletions", APIFormatResponses}

APIFormats is the ModelConfig CRD's enum for openAI.apiFormat.

View Source
var ChatGPTLoginKeys = []string{"access_token", "refresh_token", "account_id"}

ChatGPTLoginKeys are the keys of a ChatGPT login's Secret.

CodingRuntimes are the runtimes platform.coding.harnesses takes.

View Source
var CredentialTypes = []string{"apiKey", CredentialTypeChatGPT}

CredentialTypes is the ModelConfig CRD's enum for openAI.credentialType.

DevImageComponents are the targets platform.devImages can swap: the agent-platform chart's component names (its `components.<name>` entries) for the Deployments the lab's dev loops build from a checkout — the agentgateway component's two Deployments under their own names — plus DevImageHarness for the platform Harness's runtime image and one target per coding Harness's image (DevImageClaudeHarness, DevImageCodexHarness, DevImageOmpHarness).

View Source
var Groups = []string{groupPlatformAdmins, groupDevelopers, groupViewers, GroupTenantA, GroupTenantB}
View Source
var ModelManagerBackends = backendKinds()

ModelManagerBackends lists the backends the lab accepts, in the canonical order `agentlab configure` writes them — which is also the preference for the one model-manager fronts.

ModelProviderNames is ModelProviders' keys in a stable order, for the form options and error messages.

View Source
var ModelProviders = map[string]string{
	ProviderOpenAI:    "OPENAI_API_KEY",
	ProviderAnthropic: "ANTHROPIC_API_KEY",
	ProviderGemini:    "GOOGLE_API_KEY",
	ProviderOllama:    "",
}

ModelProviders maps each provider to the key name inside the Secret. The kagent controller injects that key as an env var of the same name into agent pods, and the ADK runtime looks up exactly these canonical names — so the key name is provider-derived, not configurable. Ollama is keyless (empty key = no Secret).

PinnedNodePorts are the node-side ports the lab fixes itself. They share the node's port space with DexPort, whose Service claims the host port as its NodePort, so nothing else may take one of these numbers.

PortalModes lists the portal modes, the default first.

View Source
var ReasoningEfforts = []string{"none", "minimal", "low", "medium", "high", "xhigh"}

ReasoningEfforts is the ModelConfig CRD's enum for openAI.reasoningEffort on the kagent line (api.kagent.dev/v1alpha3).

View Source
var TenantUsers = []User{
	{Email: "alice@lab.local", Username: "alice", Name: "Lab Tenant A", Password: defaultPassword, Groups: []string{GroupTenantA}},
	{Email: "bob@lab.local", Username: "bob", Name: "Lab Tenant B", Password: defaultPassword, Groups: []string{GroupTenantB}},
}

TenantUsers are the people `agentlab configure --tenants` adds when no user carries their tenant group: one person per organization of tenants-test, in that group alone.

View Source
var WorkspaceOrganizationGroups = []string{groupPlatformAdmins, groupDevelopers}

Functions

func BackendPort added in v0.15.0

func BackendPort(backend string) int

BackendPort is the default API port of a backend's server, 0 for a kind the lab does not know.

func BackendServerName added in v0.15.0

func BackendServerName(backend string) string

BackendServerName is a backend's server as messages name it; an unknown kind is named by itself rather than mistaken for one of the known servers.

func BranchHash added in v0.57.5

func BranchHash(branch string) string

BranchHash is gitsemver 3's branch fingerprint, the `r<hash>` field of a dev version: the CRC-32/ISO-HDLC checksum (Go's crc32.ChecksumIEEE) of the full, unsanitized branch name as eight lowercase hex digits — what `gitsemver branch-hash <branch>` prints. `main` is bf28cd64, `giantswarm` 588f3d76.

func CodingChartRuntime added in v0.110.0

func CodingChartRuntime(runtime string) string

CodingChartRuntime is the `runtime` the kagent chart's harnesses[] entry of a coding runtime names: the runtime itself where kagent has one, `byo` for omp, which runs the omp-harness adapter on an image the entry names.

func CodingHarnessDevImage added in v0.109.0

func CodingHarnessDevImage(runtime string) string

CodingHarnessDevImage is the devImages key of a coding runtime's image.

func ConnectivityChartDir added in v0.53.2

func ConnectivityChartDir(chartPath string) string

ConnectivityChartDir is where a checkout keeps the connectivity chart next to the meta chart directory chartPath names: helm/agent-platform's sibling helm/agent-platform-connectivity.

func Exists added in v0.120.0

func Exists(path string) bool

Exists reports whether a lab's agentlab.yaml is at path (a link to one included).

func IsChatGPTLoginSecret added in v0.121.0

func IsChatGPTLoginSecret(labels map[string]string) bool

IsChatGPTLoginSecret reports whether a Secret's labels opt it in to kagent's login refresher.

func LoopbackBindable added in v0.119.0

func LoopbackBindable(addr string) bool

LoopbackBindable reports whether this machine can bind addr: a listener on an ephemeral port of it opens.

func MajorOf added in v0.51.0

func MajorOf(version string) uint64

MajorOf is the major of an exact chart version (a leading v tolerated), 0 when the string is not one.

func RebasePaths added in v0.120.0

func RebasePaths(file, dir string) error

RebasePaths makes every relative path in the agentlab.yaml at file — platform.chartPath, platform.valuesFiles, platform.tls's certFile and keyFile, platform.vmManager.imageDir — absolute against dir, the lab directory they are relative to, and writes the file when any changed: the step before a lab moves out of dir. A file with relative paths and a field this release does not know is refused and left as it is: the write would drop the field.

func RegistryDevImage added in v0.109.0

func RegistryDevImage(component string) bool

RegistryDevImage reports whether a devImages target is pushed to the lab registry and pinned by digest (a Harness's image) rather than side-loaded into the node as a Deployment's.

func SanitizeBranch added in v0.27.0

func SanitizeBranch(branch string) string

SanitizeBranch spells a git branch the way gitsemver 2 (sanitizeBranchName) embedded it in the superseded dev shape `X.Y.Z-dev.<branch>.<date>.<time>. h<sha>`, which the registry still holds: lowercased, runs of anything but [a-z0-9] collapsed to one hyphen, hyphens trimmed off both ends — `poc/kagent-main` is `poc-kagent-main`. A purely numeric result loses its leading zeros (a semver numeric identifier forbids them); an empty result is gitsemver's "unknown". gitsemver 2 may further have shortened the name to fit its 63-character version budget (head`--`tail), which the dev-tag filter accounts for. gitsemver 3 embeds BranchHash instead.

func ValidateAIModel

func ValidateAIModel(s string) error

ValidateAIModel constrains the DEFAULT model to Anthropic: both consumers (the kagent ModelConfig provider and Backstage's ai-chat prefix routing) are wired for Anthropic only, keyed by the one $ANTHROPIC_API_KEY secret. Other providers go through platform.extraModels instead.

func ValidateAPIKeyEnv added in v0.10.0

func ValidateAPIKeyEnv(s string) error

ValidateAPIKeyEnv accepts an env var name or empty (keyless endpoint).

func ValidateChartBranch added in v0.27.0

func ValidateChartBranch(s string) error

ValidateChartBranch accepts a branch name that leaves something to match a dev tag with; "" is the stable channel and always fine.

func ValidateChartVersion added in v0.23.0

func ValidateChartVersion(s string) error

ValidateChartVersion accepts an exact chart version only.

func ValidateClusterName

func ValidateClusterName(s string) error

ValidateClusterName is the one home of the cluster-name rule; the huh form uses it directly as an input validator.

func ValidateImageRef added in v0.23.0

func ValidateImageRef(s string) error

ValidateImageRef accepts an image reference that names its tag or digest.

func ValidateModelName added in v0.10.0

func ValidateModelName(s string) error

ValidateModelName is the one home of the extra-model-name rule; the huh form uses it directly as an input validator.

func ValidateNodePort

func ValidateNodePort(s string) error

ValidateNodePort checks the Kubernetes NodePort range; the Dex port must be a NodePort because the Service exposes it as one. String-typed (like ValidatePort) so the huh form inputs can use it directly.

func ValidatePort

func ValidatePort(s string) error

func ValidateProofRepositories added in v0.123.0

func ValidateProofRepositories(key string, repos []string) error

ValidateProofRepositories checks an instance's proof repositories: none, or two distinct <owner>/<name> paths, key naming the field.

func ValidateSecretSource added in v0.84.6

func ValidateSecretSource(s string) error

ValidateSecretSource is the one home of the secret-reference rule; the huh form uses it directly as an input validator.

Types

type AIKey added in v0.84.6

type AIKey struct {
	// Source is a reference `beekeeper secret copy` resolves: a field of the
	// shared vault (op://<vault>/<item>/<field>) or one value of a SOPS file
	// (<file>#<dotted.path>, sops:// in front optional). Empty means the key
	// comes from $ANTHROPIC_API_KEY at deploy time, else a placeholder.
	Source string `yaml:"source,omitempty"`
}

AIKey is where the Anthropic key of the default ModelConfig comes from: never this file. Source names where the operator's secret tooling finds it; `agentlab up` and `platform` hand the reference to that tooling, which writes the value from there straight into the lab's Secret in its own process (internal/lab/anthropic.go), so the lab carries the key after every recreate without a manual step and agentlab never reads a value.

func (AIKey) Validate added in v0.84.6

func (k AIKey) Validate() error

Validate refuses a source that is not a reference: a value pasted into the file (a key, or anything that is neither an op:// field nor a SOPS path) must never reach agentlab.yaml.

type Backstage

type Backstage struct {
	Enabled bool `yaml:"enabled"`
	// Backstage binds this port on the node (hostNetwork) and kind maps the
	// same number onto the host, so the URL is identical on both sides.
	// The image is not configured here: the agent-platform chart's backstage
	// component (its version range, resolved by the chart's Flux) decides the
	// version; platform.devImages swaps in a build of your own.
	Port int `yaml:"port"`
	// Portal is the portal mode the lab's app-config overlay renders:
	// PortalAgentPlatform (the Agent Platform shell, app.portals.agentPlatform
	// on) or PortalClassic (the classic Platform Portal alone). The overlay
	// is an app-config file Backstage deep-merges last, so the switch never
	// restates a chart list such as backstage.extraEnvVars.
	Portal string `yaml:"portal"`
	// InstallationsPage enables the portal's Installations page and its
	// sidebar entry (page:gs/installations, nav-item:gs/installations), which
	// the agent-platform chart turns off and the Backstage app ships off: the
	// portal's installations e2e specs drive it (AGENTLAB_INSTALLATIONS_PAGE=1).
	InstallationsPage bool `yaml:"installationsPage,omitempty"`
}

func (Backstage) AgentPlatformPortal added in v0.110.0

func (b Backstage) AgentPlatformPortal() bool

AgentPlatformPortal reports whether the portal serves the Agent Platform shell (app.portals.agentPlatform).

type ChatGPTSubscription added in v0.129.0

type ChatGPTSubscription struct {
	// On, `agentlab platform` renders the model entry and muster's token
	// encryption.
	Enabled bool `yaml:"enabled"`
	// Model is the ChatGPT Codex backend's model the entry runs; empty is
	// DefaultChatGPTSubscriptionModel.
	Model string `yaml:"model,omitempty"`
}

ChatGPTSubscription configures a person's own ChatGPT login as a codex model.

type Coding added in v0.97.0

type Coding struct {
	// On, `agentlab platform` renders the coding Harnesses through the
	// chart's kagent.harnesses.
	Enabled bool `yaml:"enabled"`
	// Harnesses are the coding Harnesses rendered, by runtime (one of
	// CodingRuntimes), each named after it; empty is claude alone. codex
	// renders on the chart's codex-harness image, which needs a kagent line
	// whose chart takes `runtime: codex`; omp renders a BYO entry on the
	// image Images names, which needs a kagent line whose chart takes
	// `runtime: byo`.
	Harnesses []string `yaml:"harnesses,omitempty"`
	// Images are the images of the coding Harnesses the chart has no image
	// of its own for (omp: the kagent line's omp-harness adapter, the digest
	// a release's chart stamps as runtimeImages.ompHarness), by runtime,
	// pinned by digest. A dev image (platform.devImages `<runtime>-harness`)
	// wins over an entry here.
	Images map[string]string `yaml:"images,omitempty"`
}

Coding configures the lab's coding Harnesses.

type Config

type Config struct {
	// Kind cluster name; also prefixes RBAC bindings and names the muster
	// installation surfaced in Backstage.
	ClusterName string `yaml:"clusterName"`
	// Dex NodePort == host port: the issuer (Issuer) must
	// be the same URL from the Mac and from inside the node, so both sides
	// use one number. Must sit in the NodePort range (30000-32767).
	DexPort  int    `yaml:"dexPort"`
	DexImage string `yaml:"dexImage"`
	// APIServerPort is the host port (on 127.0.0.1) of the cluster's
	// Kubernetes API server. Fixed, so a recreated lab keeps its address:
	// an agent sandbox's allow list names it as 127.0.0.1:<port>, and kind
	// would otherwise pick a random one at every `kind create`.
	APIServerPort int `yaml:"apiServerPort"`

	// SubstrateNodes adds that many kind worker nodes reserved for Agent
	// Substrate: labelled and tainted SubstrateNodeKey, they carry the atelet
	// DaemonSet and the WorkerPool's workers and nothing else, so stopping one
	// removes exactly what a spot interruption removes — the node-loss proofs
	// of paused actors' snapshots. 0, the default, is the single-node lab.
	// Fixed at `kind create`, like every node of the cluster.
	SubstrateNodes int `yaml:"substrateNodes,omitempty"`

	// The Claude model both AI consumers use: the platform agents' default
	// ModelConfig (kagent) and Backstage's ai-chat. The API key is NOT config:
	// it lands only in Kubernetes Secrets, never in this file or in rendered
	// manifests — from the source AIKey records, else $ANTHROPIC_API_KEY at
	// deploy time, else a placeholder.
	AIModel string `yaml:"aiModel"`
	// AIKey is where the key of the default ModelConfig comes from.
	AIKey AIKey `yaml:"aiKey,omitempty"`
	// GitHubToken is where the token of the lab's calls to GitHub comes from.
	GitHubToken GitHubToken `yaml:"githubToken,omitempty"`
	// GitHubApp is the skills GitHub App agent-manager resolves skills with.
	GitHubApp GitHubApp `yaml:"githubApp,omitempty"`

	Users     []User    `yaml:"users"`
	Platform  Platform  `yaml:"platform"`
	Backstage Backstage `yaml:"backstage"`
}

func Default

func Default() *Config

Default returns the canonical lab setup: the agent platform enabled (it is what the lab exists to test) with the agentgateway edge and Backstage — the real platform topology — three users, and Dex on 32000.

func Load

func Load() (*Config, error)

Load reads agentlab.yaml. A missing file is reported as os.ErrNotExist so callers can decide whether to fall back to the form or to defaults.

func LoadForConfigure added in v0.114.6

func LoadForConfigure() (*Config, error)

LoadForConfigure reads agentlab.yaml like Load without validating it: configure validates the result after its flags apply, so a file an earlier agentlab wrote in a shape this one refuses is repaired by the configure the refusal names.

func LoadReadOnly added in v0.120.0

func LoadReadOnly() (cfg *Config, note string, err error)

LoadReadOnly reads agentlab.yaml for a command that never writes it (`trust`, `status`, `open`, …): like Load, except that a field this release does not know — the file was written by a newer agentlab — is read past and returned as the note to show, not refused. The strict refusal exists so a write never drops such a field; a command that writes nothing cannot, and the person can still trust, inspect and open a lab a newer build wrote. Nothing is re-hashed or written.

func Peek added in v0.62.0

func Peek(dir string) (*Config, error)

Peek reads the agentlab.yaml of the lab in dir without validating, re-hashing or writing anything — `agentlab list`'s look at a lab that is not the one the command runs against. It writes nothing, so it reads past a field this release does not know (decodeTolerant).

func (*Config) AdminUser

func (c *Config) AdminUser() *User

AdminUser returns the first user in platform-admins: the identity the up verification loop and the smoke tests default to.

func (*Config) AgentgatewayBaseURL added in v0.11.0

func (c *Config) AgentgatewayBaseURL() string

AgentgatewayBaseURL is the agentgateway hostname through the edge: the path-prefixed platform APIs (the kagent controller at /kagent) live here, same as the chart's Backstage app-config derives them.

func (*Config) AlertmanagerEnabled added in v0.111.0

func (c *Config) AlertmanagerEnabled() bool

AlertmanagerEnabled reports whether the lab runs the Alertmanager: the platform with its observability stack, and the key on.

func (*Config) BackstageBaseURL

func (c *Config) BackstageBaseURL() string

BackstageBaseURL is Backstage's public URL through the agentgateway edge.

func (*Config) BackstageDirectURL

func (c *Config) BackstageDirectURL() string

BackstageDirectURL bypasses the edge (hostNetwork port mapping), kept for debugging.

func (*Config) ChartBackends added in v0.52.0

func (c *Config) ChartBackends() []string

ChartBackends is the list the chart's model-manager fronts, in order (the first is its default backend): the host model servers of platform.modelManager while it is on, then the platform's own serving (ModelManagerBackendKServe) while platform.serving is. Empty when neither is on.

func (*Config) ChartChannel added in v0.51.0

func (c *Config) ChartChannel() string

ChartChannel names where the meta chart comes from: a chart directory wins over a branch, a branch over the pinned release (the same precedence the install applies).

func (*Config) ChartMajor added in v0.39.1

func (c *Config) ChartMajor() uint64

ChartMajor is the major version of the meta chart release platform. chartVersion pins (a leading v tolerated); 0 when it is not an exact version — ValidateChartVersion rejects that before anything renders.

func (*Config) ChatGPTSubscriptionEnabled added in v0.129.0

func (c *Config) ChatGPTSubscriptionEnabled() bool

ChatGPTSubscriptionEnabled reports whether the chart renders a person's own ChatGPT login as a codex model: the platform with its agents runtime, and the key on (Validate requires the codex Harness and the workspaces).

func (*Config) ChatGPTSubscriptionModel added in v0.129.0

func (c *Config) ChatGPTSubscriptionModel() string

ChatGPTSubscriptionModel is the model of a person's own ChatGPT login.

func (*Config) CheckFamiliesChartFloor added in v0.64.0

func (c *Config) CheckFamiliesChartFloor() error

CheckFamiliesChartFloor refuses a released 4.x chart before familiesChartFloor, which would register the family-less mcp-kubernetes next to the lab's families. Checked where the chart is installed, not on load, so `agentlab configure --chart-version` can move an older pin. The 3.x line (a migration rehearsal's seed, a maintenance-line fix), a branch build, a chart directory and an upgrade proof's seed (platform.upgradeSeed) are not checked.

func (*Config) CheckValuesFiles added in v0.69.1

func (c *Config) CheckValuesFiles() error

CheckValuesFiles refuses a platform.valuesFiles entry that cannot be read. It is not part of Validate: only the platform install merges the overlays, so `down`, `status` and `configure` work on a lab whose overlay is gone. The error names the entry and never wraps fs.ErrNotExist, which Load's callers read as "no agentlab.yaml".

func (*Config) ChooseFreeDomain added in v0.119.0

func (c *Config) ChooseFreeDomain(recorded map[string]string, bindable func(addr string) bool) *DomainChange

ChooseFreeDomain moves platform.domain off a domain another registered lab records (`recorded`, domain → lab name) and returns the change, nil when there is none. Two labs on one domain share every hostname: the browser's cookies and HSTS pins for one apply to the other, which serves a certificate of another CA, and GitHub App and Dex callback URLs, derived from the hostnames, cannot tell them apart.

On a loopback wildcard domain (127.0.0.1.nip.io) lab n takes its own loopback address as well: domain lab<n>.127.0.0.<n>.nip.io, the edge on 127.0.0.<n>:443, for the first n from 2 whose domain no lab records and whose address this machine binds (bindable; Linux routes all of 127.0.0.0/8 to loopback, macOS only 127.0.0.1). Without such an address, and on any other domain, it is the first free lab<n>.<base>, the edge staying where it is.

Meant, like ChooseFreePorts, for a configuration whose cluster does not exist: the domain is in the lab CA's name constraints and every rendered URL, the address in the node's port mapping. An externally provisioned pair (platform.tls) is never moved: its certificate covers the domain it was issued for.

func (*Config) ChooseFreePorts added in v0.7.0

func (c *Config) ChooseFreePorts(ours map[int]bool, recorded map[string]string, minPublishable int) []PortChange

ChooseFreePorts probes every host-side port of the configuration on 127.0.0.1 — the address all kind port mappings bind — and moves each unusable one to a nearby free port, returning what changed so the caller can tell the user. Ports in `ours` are the lab's own (published by an existing kind node or lab registry of this very configuration) and never count as occupied. Ports in `recorded` belong to another lab on this machine (its agentlab.yaml records them, the value names it): occupied whether that lab runs or not, since both could never be up together. Ports below minPublishable are ones the container engine cannot bind at all (rootless podman and the privileged range); pass 1 where every port is available. Meant for a configuration whose cluster does not exist (yet, or any more): an existing cluster's mappings are fixed at node creation, where renumbering would only mislead — PortConflicts is the read-only check for that case.

func (*Config) ClusterManagerEnabled added in v0.91.0

func (c *Config) ClusterManagerEnabled() bool

ClusterManagerEnabled reports whether the lab turns the chart's cluster-manager component on: the platform, with a dev image named for it (DevImageClusterManager) — the lab's one switch for a component the meta chart ships off. An overlay that enables it is the chart's business, not this lab's.

func (*Config) CodexModelConfig added in v0.111.0

func (c *Config) CodexModelConfig() string

CodexModelConfig is the lab's model for a codex agent: the first platform.extraModels entry that speaks the Responses API (the only one the codex runtime speaks), "" when none does.

func (*Config) CodingEnabled added in v0.97.0

func (c *Config) CodingEnabled() bool

CodingEnabled reports whether the lab renders its coding Harnesses: the platform with its agents runtime, and the key on.

func (*Config) CodingHarnessImage added in v0.110.0

func (c *Config) CodingHarnessImage(runtime string) string

CodingHarnessImage is the image platform.coding.images names for a coding runtime, "" where the chart's own image of the runtime applies.

func (*Config) CodingHarnessRendered added in v0.109.0

func (c *Config) CodingHarnessRendered(runtime string) bool

CodingHarnessRendered reports whether the lab renders the coding Harness of the runtime: one of CodingHarnesses with coding agents on; claude also for the workspaces proof's Session, whenever the workspaces are on.

func (*Config) CodingHarnesses added in v0.109.0

func (c *Config) CodingHarnesses() []string

CodingHarnesses are the coding runtimes the lab renders a Harness of while coding agents are on: platform.coding.harnesses, claude when it is empty.

func (*Config) ControlPlaneNode

func (c *Config) ControlPlaneNode() string

ControlPlaneNode is the docker container name kind gives the (only) node.

func (*Config) DevctlEnabled added in v0.130.0

func (c *Config) DevctlEnabled() bool

DevctlEnabled reports whether the lab runs devctl's MCP server: the platform, the agents and the key on (Validate requires the workspaces' github instance beside them).

func (*Config) DevctlVersion added in v0.130.0

func (c *Config) DevctlVersion() string

DevctlVersion is the devctl release the lab installs.

func (*Config) DexHost added in v0.72.0

func (c *Config) DexHost() string

DexHost is the issuer's host: localhost, or dex.<domain> with an externally provisioned pair. A name either way, never an IP literal: muster refuses an issuer whose host is one.

func (*Config) EnsureHashes

func (c *Config) EnsureHashes() (changed bool, err error)

EnsureHashes fills in User.PasswordHash wherever it is missing or no longer matches the password. The hash is cached in the config file on purpose: bcrypt salts are random, so hashing at render time would change the Dex manifest (and roll the pod) on every single run.

func (*Config) EnsureTenantUsers added in v0.116.0

func (c *Config) EnsureTenantUsers() []string

EnsureTenantUsers adds each of TenantUsers whose group no user carries and whose email is free, and returns the emails it added.

func (*Config) FamilylessChart added in v0.82.0

func (c *Config) FamilylessChart() bool

FamilylessChart reports whether the lab's connectivity chart registers the bundled mcp-kubernetes as the family-less MCPServer `mcp-kubernetes` instead of a kubernetes family member: the 3.x line, and a released 4.x chart before familiesChartFloor (an upgrade proof's seed). The boot and the proofs address that server, and platform-test skips the families proof.

func (*Config) FindUser

func (c *Config) FindUser(email string) *User

func (*Config) FindUserInGroup added in v0.13.0

func (c *Config) FindUserInGroup(group string) *User

FindUserInGroup returns the first user carrying group, or nil.

func (*Config) GatewayHostAddress added in v0.119.0

func (c *Config) GatewayHostAddress() string

GatewayHostAddress is the loopback address the edge is published on, the address every public hostname of the lab resolves to on the host.

func (*Config) GatewayURL added in v0.88.0

func (c *Config) GatewayURL(prefix string) string

GatewayURL is the public URL of the platform hostname <prefix>.<domain> through the edge, from this host (a proof's own fixture behind the edge).

func (*Config) GitHubSignInCallbackURL added in v0.86.0

func (c *Config) GitHubSignInCallbackURL() string

GitHubSignInCallbackURL is the connector's redirect URI, the lab Dex's own callback — the URL registered on the App. A loopback URL works there because GitHub only redirects the browser to it; the App's callback list (ten entries) is how one App serves several labs.

func (*Config) GitHubSignInEnabled added in v0.86.0

func (c *Config) GitHubSignInEnabled() bool

GitHubSignInEnabled reports whether the lab Dex gets the GitHub connector. Dex is part of every lab, so nothing else gates it.

func (*Config) HostPorts added in v0.111.0

func (c *Config) HostPorts() []string

HostPorts returns every host-side address the configuration binds, as host:port: what another lab on this machine must not use while this one may come up.

func (*Config) Issuer

func (c *Config) Issuer() string

Issuer is the Dex issuer URL, one URL on both sides of the kind boundary: https://localhost:<DexPort>/dex, or with an externally provisioned pair (platform.tls) https://dex.<domain>:<DexPort>/dex, served with that pair.

func (*Config) KagentUIBaseURL

func (c *Config) KagentUIBaseURL() string

func (*Config) KlausGatewayEnabled added in v0.45.0

func (c *Config) KlausGatewayEnabled() bool

KlausGatewayEnabled reports whether the platform runs the klaus-gateway component: the platform with its agents runtime, and the key on.

func (*Config) LegacyChart added in v0.39.1

func (c *Config) LegacyChart() bool

LegacyChart reports whether the lab installs a meta chart of the 3.x line. The 3.x line's values are a different shape (kagent 0.10 with its bundled Postgres, no Agent Substrate, no platform Postgres, a closed root schema that refuses the 4.x keys), so the lab values render in that shape for it. The chart the lab installs decides, not the channel: a release or a dev build (platform.chartBranch, the resolved build in chartVersion) by its major below 4, a chart directory (platform.chartPath) by its roster (legacyChartDir) — a branch of the 3.x maintenance line is as legacy as its releases.

func (*Config) MCPServerName

func (c *Config) MCPServerName() string

MCPServerName is the MCPServer CR the connectivity chart registers for the bundled mcp-kubernetes (mcp-kubernetes.mcpServer.managementCluster): a member of muster's kubernetes family, named the way agent-platform-mcps names every management cluster's. Muster exposes the family's tools as x_kubernetes_<tool>, the argument management_cluster selecting the lab. The 3.x line's and an upgrade seed's connectivity chart (FamilylessChart) registers the family-less mcp-kubernetes instead, its tools x_mcp-kubernetes_<tool>.

func (*Config) ModelManagerEnabled added in v0.11.0

func (c *Config) ModelManagerEnabled() bool

ModelManagerEnabled reports whether the platform installs model-manager.

func (*Config) MusterBaseURL

func (c *Config) MusterBaseURL() string

MusterBaseURL is muster's public URL: client -> agentgateway edge -> muster, the real platform topology. What Claude Code dials and what muster's OAuth server advertises.

func (*Config) MusterDirectURL

func (c *Config) MusterDirectURL() string

MusterDirectURL bypasses the edge: the hostNetwork port mapping straight to muster, kept for debugging the lab's own plumbing.

func (*Config) MusterReplicas added in v0.111.0

func (c *Config) MusterReplicas() int

MusterReplicas is the number of muster pods the lab runs: two on the pod network (Platform.MusterPodNetwork), else one — a host-network pod binds its port on the single kind node, so a second one would never start.

func (*Config) Normalize

func (c *Config) Normalize()

Normalize applies cross-field implications after an entry point sets the enable flags: Backstage's muster plugin is the reason to run it, so it implies the platform. Validate stays the backstop for hand-edited files.

func (*Config) ObservabilityBaseURL added in v0.6.0

func (c *Config) ObservabilityBaseURL() string

ObservabilityBaseURL is the lab Prometheus's public query API through the edge, at the /prometheus prefix Backstage's Mimir integration expects (observability-route.yaml.tmpl). Backstage itself always dials it in-cluster on 443 (the CoreDNS rewrite), so only host-side callers see GatewayPort.

func (*Config) PortConflicts added in v0.15.0

func (c *Config) PortConflicts(ours map[int]bool) []PortConflict

PortConflicts reports which host-side ports of the configuration another process holds, ignoring the lab's own (`ours`, the ports the existing kind node and lab registry publish). Nothing is changed.

func (*Config) PrometheusMCPServerName added in v0.64.0

func (c *Config) PrometheusMCPServerName() string

PrometheusMCPServerName is the lab's mcp-prometheus as a member of the prometheus family (the agent-platform-mcps entry's default name): x_prometheus_<tool> with management_cluster set to the lab.

func (*Config) RefusalNoticesChart added in v0.126.0

func (c *Config) RefusalNoticesChart() bool

RefusalNoticesChart reports whether the lab's meta chart runs the egress refusal notices: a released chart from refusalNoticesChartFloor on, a chart directory, a branch build.

func (*Config) Save

func (c *Config) Save() error

func (*Config) ServingEnabled added in v0.52.0

func (c *Config) ServingEnabled() bool

ServingEnabled reports whether the platform serves models on llm-d: the platform with its agents runtime, and the key on.

func (*Config) SkillsGitHubApp added in v0.105.0

func (c *Config) SkillsGitHubApp() GitHubApp

SkillsGitHubApp is the App agent-manager and the portal resolve skills with: githubApp, its appId and privateKeySource those of the workspaces GitHub App (platform.workspaces.github) when githubApp leaves both empty, so a lab whose workspaces App is installed records only the installation id; the workspaces App's OAuth client, when it records both halves, comes with it unless githubApp names one. Zero when githubApp records nothing.

func (*Config) SubstrateNodeNames added in v0.77.0

func (c *Config) SubstrateNodeNames() []string

SubstrateNodeNames are the container (and Node) names kind gives the substrateNodes workers: <cluster>-worker, <cluster>-worker2, …

func (*Config) TenantsEnabled added in v0.110.0

func (c *Config) TenantsEnabled() bool

TenantsEnabled reports whether the platform treats the Organizations' namespaces as tenants: the platform with its agents runtime on the current line, and the key on.

func (*Config) VMManagerEnabled added in v0.43.0

func (c *Config) VMManagerEnabled() bool

VMManagerEnabled reports whether the platform registers the host vm-manager with muster. The platform is all it needs: vm-manager is an MCP server of muster's, not a consumer of the agents runtime.

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) WorkspaceGitHubProvider added in v0.89.0

func (c *Config) WorkspaceGitHubProvider() bool

WorkspaceGitHubProvider reports whether the workspace-manager gets the provider instance github: workspaces on with platform.workspaces.provider naming it.

func (*Config) WorkspaceGitLabProvider added in v0.97.0

func (c *Config) WorkspaceGitLabProvider() bool

WorkspaceGitLabProvider reports whether the workspace-manager gets the provider instance gitlab: workspaces on with platform.workspaces.provider naming it.

func (*Config) WorkspaceGrantProvider added in v0.112.0

func (c *Config) WorkspaceGrantProvider() string

WorkspaceGrantProvider is the instance muster pins the workspace-manager's registration to: platform.workspaces.grantProvider, or the first instance; "" with workspaces off and with WorkspaceProviderApps, which pins none.

func (*Config) WorkspaceManagerBaseURL added in v0.89.0

func (c *Config) WorkspaceManagerBaseURL() string

WorkspaceManagerBaseURL is the workspace-manager's public base URL through the edge, where it serves its MCP endpoint and the grants' key set.

func (*Config) WorkspaceProviderApps added in v0.122.0

func (c *Config) WorkspaceProviderApps() bool

WorkspaceProviderApps reports whether muster keeps one provider App per instance, side by side, with the workspace-manager's registration pinned to none (platform.workspaces.grantProvider: WorkspaceGrantProviderApps): the meta chart derives the Apps, and a person grants each once (core_auth_login app=<instance>).

func (*Config) WorkspaceProviders added in v0.89.0

func (c *Config) WorkspaceProviders() []string

WorkspaceProviders names the workspace-manager's provider instances, in the order it gets them: what platform.workspaces.provider names, github alone while it is empty; none with workspaces off. A value Validate refused yields none too.

func (*Config) WorkspacesCSICompanion added in v0.100.0

func (c *Config) WorkspacesCSICompanion() bool

WorkspacesCSICompanion reports whether the chart's CSI companion is Substrate's workspace driver: workspaces (which come with the agents, and Substrate with them) and the key on.

func (*Config) WorkspacesEnabled added in v0.88.0

func (c *Config) WorkspacesEnabled() bool

WorkspacesEnabled reports whether the lab installs the workspace storage and the chart its workspace-manager: the platform and the key on (Validate requires the agents beside them, and Agent Substrate comes with those).

type Devctl added in v0.130.0

type Devctl struct {
	// On, `agentlab platform` installs devctl's chart into the platform
	// namespace with muster.mcpServer.enabled and github.grantApp the github
	// instance, and adds that instance to the workspace-manager
	// registration's providerApps; off, it uninstalls the release.
	Enabled bool `yaml:"enabled"`
	// Version is the devctl release (its chart and image), "" for
	// DefaultDevctlVersion.
	Version string `yaml:"version,omitempty"`
}

Devctl configures devctl's MCP server in the lab.

type DomainChange added in v0.119.0

type DomainChange struct {
	From, To string
	// Address is the loopback address the edge moved to with the domain,
	// empty when it stayed.
	Address string
	// Lab is the registered lab that records From.
	Lab string
}

DomainChange records platform.domain moved off another lab's.

func (DomainChange) String added in v0.119.0

func (ch DomainChange) String() string

type ExtraModel added in v0.10.0

type ExtraModel struct {
	// ModelConfig CR name; also names the key Secret kagent-<name>.
	Name string `yaml:"name"`
	// One of ModelProviders (a subset of the kagent CRD's enum: the providers
	// expressible with just a model + base URL).
	Provider string `yaml:"provider"`
	// The provider's model id (what the endpoint serves, e.g. `qwen3-8-27b`
	// for a local vLLM or `deepseek/deepseek-chat` on OpenRouter).
	Model string `yaml:"model"`
	// Endpoint override. Required for Ollama (the in-cluster default would be
	// useless), optional for OpenAI/Anthropic (any compatible endpoint:
	// vLLM `http://host:8000/v1`, OpenRouter `https://openrouter.ai/api/v1`),
	// not applicable to Gemini.
	BaseURL string `yaml:"baseUrl,omitempty"`
	// Host env var holding the API key at deploy time. Empty means a keyless
	// endpoint: the Secret is still created with a placeholder, because the
	// kagent ADK runtime requires the provider's env var to exist.
	APIKeyEnv string `yaml:"apiKeyEnv,omitempty"`
	// Skip TLS verification on the provider connection (ModelConfig spec.tls.
	// disableVerify) — for self-hosted endpoints with self-signed certs.
	InsecureTLS bool `yaml:"insecureTLS,omitempty"`
	// OpenAI provider only: the ModelConfig's openAI.reasoningEffort, sent as
	// reasoning_effort with every call. `none` switches a thinking model's
	// reasoning off on Ollama's /v1 alias.
	ReasoningEffort string `yaml:"reasoningEffort,omitempty"`
	// OpenAI provider only: the ModelConfig's openAI.apiFormat, the HTTP API
	// the model is called through — the key agent-platform-connectivity's
	// kagent.modelConfigs[] entries carry. `responses` for a model a codex
	// agent uses (the codex runtime speaks the Responses API only);
	// `chatCompletions` is the CRD's default.
	APIFormat string `yaml:"apiFormat,omitempty"`
	// OpenAI provider only: the ModelConfig's openAI.credentialType.
	// `chatgptOAuth` runs the model on a ChatGPT subscription login instead
	// of an API key: the Secret kagent-<name> holds ChatGPTLoginKeys of a
	// `codex login --device-auth`, placed by the operator's secret tooling,
	// never by agentlab. It serves codex only, so it needs apiFormat
	// responses.
	CredentialType string `yaml:"credentialType,omitempty"`
	// Ollama provider only: the ModelConfig's ollama.think, sent as the chat
	// request's think field. false switches a thinking model's reasoning off
	// on kagent's native Ollama provider (docs/models.md "Agent proofs without
	// an Anthropic key"); unset leaves Ollama's default, under which a model
	// with the thinking capability thinks.
	Think *bool `yaml:"think,omitempty"`
}

ExtraModel is one additional kagent ModelConfig. API keys are NOT config: APIKeyEnv only names the host env var read at deploy time — the value lands in the Secret kagent-<name>, never in this file or in rendered state/.

func (ExtraModel) ChatGPTLogin added in v0.121.0

func (m ExtraModel) ChatGPTLogin() bool

ChatGPTLogin reports whether the model runs on a ChatGPT login.

func (ExtraModel) NeedsSecret added in v0.10.0

func (m ExtraModel) NeedsSecret() bool

NeedsSecret reports whether this model's ModelConfig references a Secret.

func (ExtraModel) SecretKey added in v0.10.0

func (m ExtraModel) SecretKey() string

SecretKey is the key inside the Secret — the provider's canonical env var name. Empty for keyless providers (no Secret attached at all) and for a ChatGPT login, whose Secret holds ChatGPTLoginKeys.

func (ExtraModel) SecretName added in v0.10.0

func (m ExtraModel) SecretName() string

SecretName is the Kubernetes Secret (in ns kagent) holding this model's key.

func (ExtraModel) Validate added in v0.10.0

func (m ExtraModel) Validate() error

Validate checks one extra model entry; string-typed like the port validators where the form shares it, entry-level here.

type GitHub added in v0.66.0

type GitHub struct {
	// On, `agentlab platform` registers the server; off, it removes it.
	Enabled bool `yaml:"enabled"`
	// Secret is the OAuth client's Secret, keys GitHubClientIDKey and
	// GitHubClientSecretKey. Empty fields mean DefaultGitHubSecretName in
	// DefaultGitHubSecretNamespace (the MCPServer's own namespace).
	Secret SecretRef `yaml:"secret,omitempty"`
}

GitHub configures the MCPServer `github` the lab registers with muster: GitHub's hosted MCP server behind a pinned GitHub authorization server, the shape an installation declares. The OAuth client (an OAuth App, or a GitHub App's client) is a Kubernetes Secret in the lab the operator's secret tooling places; agentlab reads its key names only, never a value.

func (GitHub) ClientSecret added in v0.84.0

func (g GitHub) ClientSecret() SecretRef

ClientSecret is the OAuth client Secret the lab looks for and the MCPServer references: platform.github.secret, the defaults filling what it leaves empty.

type GitHubApp added in v0.91.0

type GitHubApp struct {
	// AppID is the App's numeric id.
	AppID string `yaml:"appId,omitempty"`
	// InstallationID is the numeric id of the App's installation whose
	// repositories the skills come from.
	InstallationID string `yaml:"installationId,omitempty"`
	// PrivateKeySource is a reference `beekeeper secret copy` resolves to the
	// App's private key (PEM), in the form AIKey.Source takes.
	PrivateKeySource string `yaml:"privateKeySource,omitempty"`
	// ClientID and ClientSecretSource are the App's OAuth client: the
	// portal's GitHub integration takes an App only with both, so the
	// portal's skill discovery calls GitHub as the App when they are set.
	// The client id is public; ClientSecretSource is a reference in the form
	// PrivateKeySource takes.
	ClientID           string `yaml:"clientId,omitempty"`
	ClientSecretSource string `yaml:"clientSecretSource,omitempty"`
}

GitHubApp is the read-only skills GitHub App agent-manager resolves skills with: installation tokens at the App's rate limit instead of a static token or GitHub's anonymous window. The App id and installation id are public; the private key is never this file: PrivateKeySource names where the operator's secret tooling finds it, and `agentlab up` and `platform` hand the reference to that tooling, which writes the key straight into the lab's Secret agentlab-github-app (internal/lab/githubapp.go).

func (GitHubApp) Configured added in v0.91.0

func (a GitHubApp) Configured() bool

Configured reports whether any part of the App is recorded; Validate refuses a partial one.

func (GitHubApp) HasClient added in v0.105.0

func (a GitHubApp) HasClient() bool

HasClient reports whether the App's OAuth client is recorded, which the portal's GitHub integration needs besides the App id and key.

func (GitHubApp) Validate added in v0.91.0

func (a GitHubApp) Validate() error

Validate refuses a partial App, an id that is not a number and a private key that is not a reference.

type GitHubSignIn added in v0.86.0

type GitHubSignIn struct {
	// On, `agentlab up`, `platform` and `reload` render the connector into
	// the Dex config once the client Secret is in place; off, the lab's Dex
	// knows its local users only.
	Enabled bool `yaml:"enabled"`
	// ClientID is the App's client id, as GitHub shows it on the App's
	// settings page. Required while on.
	ClientID string `yaml:"clientId,omitempty"`
	// Secret names the Secret in GitHubSignInSecretNamespace that carries the
	// client secret under GitHubClientSecretKey. Empty means
	// DefaultGitHubSignInSecretName.
	Secret string `yaml:"secret,omitempty"`
	// Orgs restricts the sign-in to members of these GitHub organizations
	// and puts the person's teams in them on the token as groups
	// (`<org>:<team-slug>`). Empty: any GitHub account signs in, with no
	// groups.
	Orgs []string `yaml:"orgs,omitempty"`
}

GitHubSignIn configures the `github` connector of the lab Dex: GitHub as a second identity source next to the static users, through a GitHub App (or OAuth App) whose callback is the lab Dex's own callback URL and whose permissions are what a sign-in reads (the person's profile, email and organization membership; no repository permission). The client id is public and lives here; the client secret is a Kubernetes Secret in the dex namespace the operator's secret tooling places, which the Dex pod reads as an environment variable — agentlab reads the Secret's key names only, never a value, and renders no literal.

func (GitHubSignIn) ClientSecret added in v0.86.0

func (g GitHubSignIn) ClientSecret() SecretRef

ClientSecret is the client Secret the lab looks for and the Dex pod references: platform.githubSignIn.secret in the Dex namespace, the default name filling an empty one.

func (GitHubSignIn) Validate added in v0.86.0

func (g GitHubSignIn) Validate() error

Validate checks the sign-in block: a client id while on, a Secret name the apiserver accepts, organization logins GitHub accepts.

type GitHubToken added in v0.87.0

type GitHubToken struct {
	// Source is a reference `beekeeper secret copy` resolves, in the form
	// AIKey.Source takes. Empty means no token: GitHub is called as the
	// skills GitHub App when one is recorded, else unauthenticated.
	Source string `yaml:"source,omitempty"`
}

GitHubToken is where the lab's token for GitHub comes from: never this file. Source names where the operator's secret tooling finds it; `agentlab up` and `platform` hand the reference to that tooling, which writes the value straight into the lab's Secret agentlab-github-token in its own process (internal/lab/githubtoken.go), so the portal's skill discovery and agent-manager's skill resolution call GitHub authenticated after every recreate and agentlab never reads a value.

func (GitHubToken) Validate added in v0.87.0

func (g GitHubToken) Validate() error

Validate refuses a source that is not a reference, as AIKey.Validate does.

type KlausGateway added in v0.45.0

type KlausGateway struct {
	// On, `agentlab platform` enables components.klaus-gateway with the
	// lab's values (the values template's `klausGateway:` block) and creates
	// the two Secrets the component reads: the placeholder Slack
	// credentials and the OBO keys.
	Enabled bool `yaml:"enabled"`
}

KlausGateway configures the chart's klaus-gateway component in the lab.

type ModelManager added in v0.11.0

type ModelManager struct {
	// On, `agentlab platform` enables components.model-manager in front of
	// every listed backend, its agentgateway route (JWT-validated: the portal
	// backend forwards the user's Dex token) and the muster registration.
	// A first `agentlab configure` turns it on when a host model server
	// answers (and leaves it off when none does); from then on the recorded
	// choice stands — a lab configured without managed models stays without
	// them however many servers answer — until --model-manager pins it or
	// the form changes it. Off whenever the agents runtime is off.
	Enabled bool `yaml:"enabled"`
	// The host model servers, in order; backends.go names them and owns the
	// list, so this comment cannot go stale as servers are added. ONE
	// model-manager fronts all of them at once (model-manager >= 0.17.0,
	// `model-manager.backends` in the chart values); the first entry is its
	// default backend — where a request that names none goes. `agentlab
	// configure` fills the list from what answers on this machine and can be
	// reached from pods (Ollama first); --model-manager-backends pins it.
	// kserve is not a host server: the serving switch (Platform.Serving)
	// adds it to the list the chart's model-manager fronts (ChartBackends).
	Backends []string `yaml:"backends,omitempty"`
	// Per-backend base URL as pods reach it, keyed by backend. Empty
	// autodetects http://<kind docker network gateway>:<default port> at
	// platform time (BackendPort names each server's) — the same
	// address docs/models.md documents for extraModels (`docker network inspect
	// kind`). Set one for a server elsewhere on the LAN: a backend with an
	// endpoint here is kept by `agentlab configure` whether or not a server
	// answers on this machine.
	Endpoints map[string]string `yaml:"endpoints,omitempty"`
	// The one-backend form earlier versions wrote (backend + endpoint):
	// still read, folded into backends/endpoints on load, never written.
	Backend  string `yaml:"backend,omitempty"`
	Endpoint string `yaml:"endpoint,omitempty"`
}

ModelManager configures the umbrella's model-manager component in the lab.

func (*ModelManager) ApplyDiscovered added in v0.15.0

func (m *ModelManager) ApplyDiscovered(found []string, agents, first bool, pinEnabled *bool, pinBackends []string)

ApplyDiscovered merges what `agentlab configure` found on this machine into the block: the backends are the servers that answer plus every backend kept by an explicit endpoint (a server elsewhere on the LAN), in canonical order. The flag follows the discovery on a first configure only (first: no agentlab.yaml yet): managed models go on when there is at least one backend and the agents runtime is on. A later configure keeps the recorded choice, so `configure --defaults` never turns on what the lab was configured without — except that the agents runtime off turns them off, since model-manager wires models into it. pinBackends (--model-manager-backends) replaces the list outright; pinEnabled (--model-manager) decides the flag over both — a block on without a backend falls back to the Ollama default, so the platform preflight reports the real reachability error.

func (ModelManager) EndpointFor added in v0.15.0

func (m ModelManager) EndpointFor(backend string) string

EndpointFor is the configured endpoint override of a backend, "" to autodetect.

func (ModelManager) Primary added in v0.15.0

func (m ModelManager) Primary() string

Primary is model-manager's default backend — where a request that names none goes: the first of the list, or the historical default (an Ollama) for an enabled block that names none.

func (ModelManager) Validate added in v0.11.0

func (m ModelManager) Validate(agents bool) error

Validate checks the model-manager block; agents reports whether the kagent runtime is on (model-manager wires ModelConfigs into it).

type Platform

type Platform struct {
	Enabled bool `yaml:"enabled"`
	// The agents runtime (kagent), an optional part of the platform install.
	// On real clusters agent delivery runs through Flux/GitOps, which the lab
	// does not run, so labs that are not exercising agents can skip the
	// runtime entirely. Inert when the platform itself is disabled.
	Agents bool `yaml:"agents"`
	// A minimal observability stack: the Giant Swarm kube-prometheus-stack
	// chart (the observability bundle's own pinned constituent, with the
	// Prometheus server re-enabled — the bundle itself is MC-shaped: Alloy
	// remote-writing to Mimir, no local query endpoint) plus mcp-prometheus
	// registered in muster, so agents can answer PromQL questions
	// (x_prometheus_<tool> with management_cluster set to the cluster name). On by default: asking the platform about the
	// cluster's CPU/memory is part of the demo story. Not in the umbrella's
	// BOM (yet) — the lab pins the two charts itself (observability.go).
	// Inert when the platform itself is disabled.
	Observability bool `yaml:"observability"`
	// Alertmanager adds the kube-prometheus-stack Alertmanager to the
	// observability stack, a Prometheus alerting rule that always fires
	// (AgentlabWatchdog) and ALERTMANAGER_URL on mcp-prometheus, so its alert
	// tools (x_prometheus_get_alertmanager_alerts) have alerts to read. Off by
	// default; --alertmanager turns it on; needs platform.observability. See
	// docs/observability.md "Alertmanager".
	Alertmanager bool `yaml:"alertmanager,omitempty"`
	// MCPPrometheusChartVersion overrides the mcp-prometheus chart release
	// the lab installs with the observability stack (an exact version, a
	// release candidate included), for proving a chart change the image swap
	// (devImages.mcp-prometheus) cannot carry. Empty keeps the release this
	// agentlab pins (internal/lab/observability.go); needs
	// platform.observability.
	MCPPrometheusChartVersion string `yaml:"mcpPrometheusChartVersion,omitempty"`
	// Retired: the fake fleet. The lab registers its own cluster as the
	// infrastructure families instead (MCPServerName). Read so a file an
	// earlier release wrote still loads, never written back.
	RetiredFakeFleet *bool `yaml:"fakeFleet,omitempty"`
	// Host-side port for the kagent UI (http://localhost:<port>). The kind
	// mapping onto KagentUINodePort always exists — like the other mappings,
	// it is fixed at cluster creation — so agents can be enabled later.
	AgentsPort int `yaml:"agentsPort"`
	// Host-side port for muster's DIRECT debug access (hostNetwork + kind
	// mapping, bypassing the gateway). The platform's public URLs go through
	// the agentgateway edge on GatewayPort.
	MusterPort int `yaml:"musterPort"`
	// The platform's public domain. Every public hostname derives from it
	// (muster.<domain>, backstage.<domain>, ...). The default, nip.io's
	// loopback wildcard, resolves to 127.0.0.1 from anywhere without host
	// configuration; inside pods a CoreDNS rewrite points the same names at
	// the edge Gateway Service.
	Domain string `yaml:"domain"`
	// Host-side port of the agentgateway edge (HTTPS). 443 keeps the public
	// URLs port-free; any other value suffixes every public URL with it, and
	// the lab's edge Service (gateway-nodeport.yaml.tmpl) then also serves
	// that port in-cluster, so the ported URLs resolve from pods too. Change
	// only if 443 is taken.
	GatewayPort int `yaml:"gatewayPort"`
	// GatewayAddress is the loopback address the edge is published on, empty
	// for 127.0.0.1. A second lab on the machine takes 127.0.0.<n> with the
	// domain lab<n>.127.0.0.<n>.nip.io (`configure` picks both), so it serves
	// on 443 too and its URLs carry no port: Linux routes all of 127.0.0.0/8
	// to loopback. Fixed at node creation like the ports.
	GatewayAddress string `yaml:"gatewayAddress,omitempty"`
	// TLS optionally hands the edge an externally provisioned certificate
	// pair (PEM) instead of the minted lab-CA wildcard — for users who own a
	// real domain (wildcard record -> 127.0.0.1) and run their own ACME
	// tooling. Both fields set or both empty. With a pair the Dex issuer
	// moves under the domain too (Issuer: dex.<domain>) and serves the same
	// pair, which must therefore cover that name; see docs/tls.md.
	TLS PlatformTLS `yaml:"tls"`
	// The agent-platform chart release the lab installs
	// (oci://gsoci.azurecr.io/charts/giantswarm/agent-platform): an exact
	// version, never a range — two runs install the same thing, and the lab
	// never floats onto a release nobody tested it with. DefaultChartVersion
	// is the release this agentlab was verified against.
	ChartVersion string `yaml:"chartVersion"`
	// ChartPath installs the meta chart from a local directory instead of the
	// pinned release — an agent-platform checkout's helm/agent-platform, for
	// chart changes that have no release yet (the lab's chart loop). The
	// checkout's connectivity chart beside it (ConnectivityChartDir) is
	// installed with it: the meta chart pins that component to its own
	// version, which no registry publishes for a checkout, so the lab pushes
	// the sibling into the lab registry and points the meta chart there
	// (lab/connectivity.go). Both directories are read, never written;
	// chartVersion is ignored while set.
	ChartPath string `yaml:"chartPath,omitempty"`
	// ChartBranch selects the DEV CHANNEL: the lab follows the newest dev
	// build of this agent-platform branch — the `X.Y.Z-r<branch-hash>t
	// <YYYYMMDDHHMMSS>h<sha7>` prerelease tags gitsemver 3 publishes for every
	// commit of a branch with branch publishing on (BranchHash; builds made
	// before 2026-09-23 carry the superseded `X.Y.Z-dev.<branch>.<date>.
	// <time>.h<sha>` shape, which is read too) — instead of a release. `configure`,
	// `up` and `platform` resolve it against the chart registry's tags and
	// write the tag they picked into chartVersion, so `render`, the image
	// preload and a re-run install exactly what was resolved, and the boot
	// says which build it runs. Mutually exclusive with chartPath; "" is the
	// stable channel. See docs/platform.md "Dev channel".
	ChartBranch string `yaml:"chartBranch,omitempty"`
	// ChartPinned freezes chartVersion at the recorded dev build while
	// chartBranch is set: `up` and `platform` stop re-resolving, so the lab
	// keeps running the build under test until `agentlab platform --pin=false`
	// (or the key is dropped). Meaningless without chartBranch.
	ChartPinned bool `yaml:"chartPinned,omitempty"`
	// UpgradeSeed marks the lab as an upgrade proof's seed: a released 4.x
	// chart before the lab's floor (familiesChartFloor) installs in the shape
	// that line takes (FamilylessChart), so a lab can start on an older line
	// and be upgraded in place to the current one (`agentlab configure
	// --chart-version`, then `agentlab platform`). No effect on a chart at
	// or above the floor. See docs/platform.md "Upgrade proofs from an older
	// line".
	UpgradeSeed bool `yaml:"upgradeSeed,omitempty"`
	// DevImages swaps a component's image for a build of your own (the lab's
	// dev-image loop): target -> image ref (`muster: muster:dev-1a2b`). Keys
	// are the DevImageComponents. For a Deployment target `agentlab platform`
	// side-loads the ref from the host docker cache, resolves the image name
	// it replaces from the component chart's render (the kagent controller is
	// `gsoci.azurecr.io/giantswarm/kagent/controller` on the 4.x line, the
	// path the kagent line publishes under, and
	// `gsoci.azurecr.io/giantswarm/kagent-controller` on 3.x — a target that
	// matches nothing in the render is an error before the install, never a
	// silently dropped override) and renders it into the component's
	// HelmRelease as a kustomize image override (postRenderers) with
	// imagePullPolicy IfNotPresent. For the `harness` target it pushes the
	// build to the lab registry and forwards the digest as
	// kagent.harness.image, so the platform Harness runs it and recompiles
	// every admitted template. Either way the swap is part of the release — a
	// plain `helm upgrade` applies it, and removing the entry restores the
	// chart's image (or digest) on the next run.
	DevImages map[string]string `yaml:"devImages,omitempty"`
	// DevRegistryPort is the host port (127.0.0.1) of the lab registry that
	// serves the `harness` dev image: a `registry` container on the kind
	// docker network, created on demand by `agentlab platform` and removed by
	// `agentlab down`. Unset means DefaultDevRegistryPort.
	DevRegistryPort int `yaml:"devRegistryPort,omitempty"`
	// ValuesFiles are extra Helm values files merged over the lab's rendered
	// values before the meta chart install, in order, with `helm -f`
	// semantics (maps merge, lists replace, the later file wins): a lab that
	// points a component at another chart source
	// (components.<name>.repository / versionRange / insecure) or forwards
	// values the lab template does not know. Paths are absolute or relative
	// to the lab directory; each must exist.
	ValuesFiles []string `yaml:"valuesFiles,omitempty"`
	// Additional kagent ModelConfigs beyond the chart-rendered default
	// (aiModel): self-hosted OpenAI-compatible endpoints (vLLM, Ollama),
	// OpenRouter, Gemini, plain OpenAI. Rendered as lab-labeled ModelConfig
	// CRs by `agentlab platform`; entries removed here are pruned on the next
	// run. Inert unless agents are enabled.
	ExtraModels []ExtraModel `yaml:"extraModels,omitempty"`
	// Managed models: the chart's model-manager component in front of the
	// model servers that run on the lab host (backends.go is the list, with
	// each server's port and name) — pull, load,
	// unload and delete models from the portal (or as x_model-manager_*
	// tools through muster), each pulled model wired into kagent as a
	// keyless ModelConfig automatically. Complements extraModels, which
	// wires endpoints statically and manages nothing. Requires agents.
	// `agentlab configure` fills the backends from what answers on this
	// machine, on every run.
	ModelManager ModelManager `yaml:"modelManager"`
	// The platform's VM provisioner (github.com/giantswarm/vm-manager) as a
	// pod of the kind node: the chart's components.vm-manager, turned on by
	// the lab's values (x_vm-manager_<tool> through muster, tool group
	// agent-platform, forward-token auth against the lab Dex). The node is a
	// privileged container, so the host's /dev/kvm and /dev/vhost-vsock are
	// in it for the pod. The guest image is the artifact the chart's release
	// published, or a local build pushed into the lab registry (imageDir).
	// `agentlab configure` turns it off on a machine without the devices;
	// --vm-manager turns it on. A build of the checkout swaps in through
	// devImages.
	VMManager VMManager `yaml:"vmManager"`
	// Swarmgeist (github.com/giantswarm/klaus-gateway) as the meta chart's
	// in-cluster component (components.klaus-gateway), the way every
	// installation runs it: A2A to the kagent controller over the in-cluster
	// agentgateway target, the Slack adapter on a placeholder credentials
	// Secret (no workspace answers it; the lab points its Web API at
	// klaus-gateway-test's fake), and the OBO link store as a Kubernetes
	// Secret (obo.store: secret) with keys the lab generates once. Off by
	// default; --klaus-gateway turns it on; needs the agents runtime. A build
	// of the checkout swaps in through devImages. `agentlab
	// klaus-gateway-test` proves it next to the host-mode gateway
	// (klausgateway.go).
	KlausGateway KlausGateway `yaml:"klausGateway"`
	// devctl's MCP server (github.com/giantswarm/devctl, `devctl serve`) the
	// way gazelle runs it: devctl's own released chart, never the meta
	// chart's, registered with muster as the MCPServer devctl (tools
	// x_devctl_*), acting on GitHub as the person with their grant of the
	// workspaces' github instance App, which muster keeps as the provider App
	// github beside the workspace-manager's pin. Off by default; --devctl
	// turns it on; needs the workspaces' github instance. `agentlab
	// coding-test --part devctl` proves it (internal/lab/devctl.go).
	Devctl Devctl `yaml:"devctl,omitempty"`
	// MusterPodNetwork runs muster the way an installation does: on the pod
	// network at two replicas behind the edge, a PodDisruptionBudget of
	// minAvailable 1 — the shape muster's availability work is proven in.
	// The issuer stays reachable from its pods as from every other platform
	// pod: the dex-localhost sidecar while it is spelled localhost, cluster
	// DNS under platform.tls. Off (the default), muster runs on the host
	// network at one replica, which muster's direct debug port (musterPort)
	// needs; with it on that port answers nothing. --muster-pod-network turns
	// it on. See docs/platform.md "muster on the pod network".
	MusterPodNetwork bool `yaml:"musterPodNetwork,omitempty"`
	// GitHub registers GitHub's hosted MCP server with muster, signed in to
	// as the person through an OAuth client (internal/lab/githubmcp.go).
	GitHub GitHub `yaml:"github"`
	// GitHubSignIn adds a GitHub connector to the lab Dex, so a person signs
	// in to the lab as their GitHub self next to the local users
	// (internal/lab/githubsignin.go). Its App is a sign-in App and nothing
	// else: the github MCP server above has a client of its own.
	GitHubSignIn GitHubSignIn `yaml:"githubSignIn"`
	// Model serving on llm-d: the serving slice of a Giant Swarm installation
	// on the kind node (internal/lab/serving.go) — the chart's KServe llmisvc
	// controller with its CRDs (components.kserve-llmisvc-crd and
	// -resources), the well-known LLMInferenceServiceConfigs it composes
	// from (components.kserve-runtime-configs), the connectivity chart's
	// serving objects behind components.modelServing (the serving namespace,
	// the published presets and their discovery ConfigMap, the models
	// Gateway with its JWT policy against the lab Dex) and model-manager's
	// kserve backend, which composes a preset into an LLMInferenceService.
	// cert-manager comes with it: the controller's webhook certificate is a
	// cert-manager Certificate. The node has no GPU, so the lab publishes
	// one preset of its own — a small instruct model on the llm-d CPU
	// runtime — and model-manager places it on the node's CPU capacity. Off
	// by default; --serving turns it on; needs the agents runtime, which the
	// served model is wired into. `agentlab serving-test` is the proof.
	Serving Serving `yaml:"serving"`
	// Workspace storage: the read-write-many StorageClass a workspace's
	// volume is claimed from (internal/lab/workspaces.go) — an in-cluster
	// NFS server, the NFS CSI driver with an mTLS proxy in front of its
	// controller that admits ate-api-server's pod identity alone, and the
	// StorageClass the chart's workspaces values name. Off by default;
	// --workspaces turns it on; needs the agents runtime: the chart's
	// workspaces live in kagent's namespace, so Validate refuses them without
	// it. `agentlab workspaces-test --storage-only` is the proof.
	Workspaces Workspaces `yaml:"workspaces"`
	// Coding agents: the chart's kagent.harnesses renders the lab's coding
	// Harness (internal/lab/coding.go) claude, Claude Code run headless. Off
	// by default; --coding turns it on; needs the agents runtime. `agentlab
	// coding-test` is the proof.
	Coding Coding `yaml:"coding"`
	// A person's own ChatGPT subscription as a codex model: the chart's
	// kagent.modelConfigs[] entry ChatGPTSubscriptionModelConfig with
	// credentialType chatgptOAuth and no apiKeySecret, from which the chart
	// derives muster's provider App chatgpt (OpenAI's device-code sign-in)
	// and kagent's installation provider chatgpt; muster's token encryption
	// on. Off by default; --chatgpt-subscription turns it on; needs the codex
	// coding Harness and the workspaces (muster's credential provider and the
	// Session admission). `agentlab chatgpt-test` is the proof.
	// Unset, the key is left out of the file: a lab with it off stays
	// readable by a release before it.
	ChatGPTSubscription ChatGPTSubscription `yaml:"chatgptSubscription,omitempty"`
	// The Organizations' namespaces as tenants: the chart's
	// tenants.organizations.enabled, which turns on agent-manager's tenant
	// reconciler and admits the agent workers of every namespace labelled
	// giantswarm.io/organization. Off by default; --tenants turns it on;
	// needs the agents runtime. `agentlab tenants-test` is the proof.
	Tenants Tenants `yaml:"tenants"`
	// Retired: the platform-manager fixture. Read so a file an earlier
	// release wrote still loads, never written back.
	RetiredPlatformManager any `yaml:"platformManager,omitempty"`
}

type PlatformTLS

type PlatformTLS struct {
	CertFile string `yaml:"certFile,omitempty"`
	KeyFile  string `yaml:"keyFile,omitempty"`
}

PlatformTLS is an externally provisioned certificate for the edge; see Platform.TLS.

func (PlatformTLS) Set

func (t PlatformTLS) Set() bool

Set reports whether an external edge certificate is configured.

type PortChange added in v0.7.0

type PortChange struct {
	Field    string
	What     string
	From, To int
	Why      string
	Note     string
}

PortChange records one port of the configuration that was moved off its value because this machine cannot serve the lab there. Field is the agentlab.yaml path, What names the component for the human-facing message, Why says what made the port unusable, and Note carries an extra caveat where a non-default port has consequences beyond the number itself.

func (PortChange) String added in v0.7.0

func (ch PortChange) String() string

type PortConflict added in v0.15.0

type PortConflict struct {
	Field string
	What  string
	Port  int
}

PortConflict records one port of an existing cluster's configuration that another process on this machine holds — the lab cannot renumber it (the kind mappings are fixed at node creation), so it is reported instead.

func (PortConflict) String added in v0.15.0

func (pc PortConflict) String() string

type SecretRef added in v0.84.0

type SecretRef struct {
	Name      string `yaml:"name,omitempty"`
	Namespace string `yaml:"namespace,omitempty"`
}

SecretRef names a Kubernetes Secret.

type Serving added in v0.52.0

type Serving struct {
	// On, `agentlab platform` turns on the chart's kserve-llmisvc-crd,
	// kserve-llmisvc-resources and kserve-runtime-configs components and the
	// modelServing switch with the lab's serving values (the values
	// template's `modelServing:` block: the lab preset, the models Gateway),
	// adds the kserve backend to the list model-manager fronts and installs
	// cert-manager before the chart.
	Enabled bool `yaml:"enabled"`
}

Serving configures model serving on llm-d in the lab.

type Tenants added in v0.110.0

type Tenants struct {
	// On, `agentlab platform` renders tenants.organizations.enabled: true.
	Enabled bool `yaml:"enabled"`
}

Tenants configures the Organizations' namespaces as tenants.

type User

type User struct {
	Email        string   `yaml:"email"`
	Username     string   `yaml:"username"`
	Name         string   `yaml:"name"`
	Password     string   `yaml:"password"`
	PasswordHash string   `yaml:"passwordHash"` // bcrypt of Password, cached so renders stay deterministic
	Groups       []string `yaml:"groups"`
}

func (User) HasGroup

func (u User) HasGroup(g string) bool

type VMManager added in v0.43.0

type VMManager struct {
	// On, `agentlab platform` enables components.vm-manager: the pod with
	// the node's KVM devices, OAuth against the lab Dex and the muster
	// registration the chart renders. Refused on a machine without /dev/kvm
	// and /dev/vhost-vsock (`agentlab configure` turns it off there).
	Enabled bool `yaml:"enabled"`
	// A local guest image build the pod boots instead of the artifact the
	// chart's release published — a vm-manager checkout's images/build
	// after `make -C images`: the base image, its UKI, the Kubernetes sysext
	// layers and policy.json. `agentlab platform` pushes it into the lab
	// registry and pins the chart to its digest, so a rebuilt image rolls
	// the pod on the next run. Empty: the release's guest image. An absolute
	// path, or relative to the lab directory.
	ImageDir string `yaml:"imageDir,omitempty"`
}

VMManager configures the chart's vm-manager component in the lab.

func (*VMManager) ApplyDiscovered added in v0.43.0

func (v *VMManager) ApplyDiscovered(kvm bool, pinEnabled *bool)

ApplyDiscovered follows what `agentlab configure` found: a machine without the KVM devices cannot run the pod, so the key goes off there with the reason; a machine with them keeps what the file says (the pod is a heavier piece of the lab than a model server, so it is never turned on by itself); pinEnabled (--vm-manager) decides instead.

func (VMManager) Validate added in v0.43.0

func (v VMManager) Validate() error

Validate checks the vm-manager block: the image directory, when set, is a directory that exists.

type WorkspaceGitHub added in v0.89.0

type WorkspaceGitHub struct {
	AppID    string `yaml:"appId,omitempty"`
	ClientID string `yaml:"clientId,omitempty"`
	// PrivateKeySource and ClientSecretSource are references `beekeeper
	// secret copy` resolves to the App's private key and client secret, in
	// the form AIKey.Source takes. Set, every up and platform places them
	// into the Secret, so a recreated lab carries the instance without a
	// manual step; empty, the Secret is placed by hand.
	PrivateKeySource   string `yaml:"privateKeySource,omitempty"`
	ClientSecretSource string `yaml:"clientSecretSource,omitempty"`
	// ProofRepositories are the two repositories, <owner>/<name>, the
	// workspaces sync and sessions parts mirror on this instance through
	// the App (ValidateProofRepositories): the person pushes and
	// force-pushes to a scratch branch of the first with their own git
	// credentials; the second stays as it is.
	ProofRepositories []string `yaml:"proofRepositories,omitempty"`
}

WorkspaceGitHub is the GitHub App of the workspace-manager's provider instance github: an App of its own, apart from the lab Dex's sign-in App and muster's github server client. Its App id and client id are public and live here, empty until the App is registered; its private key and client secret are the Secret WorkspaceGitHubSecretName in the platform namespace (keys WorkspaceGitHubPrivateKeyKey and GitHubClientSecretKey), which the operator's secret tooling places and agentlab only references: it reads which keys the Secret carries, never a value.

func (WorkspaceGitHub) Validate added in v0.95.0

func (g WorkspaceGitHub) Validate() error

Validate checks the two sources: each a secret reference when set.

type WorkspaceGitLab added in v0.97.0

type WorkspaceGitLab struct {
	URL      string `yaml:"url,omitempty"`
	ClientID string `yaml:"clientId,omitempty"`
	// Group is the GitLab group the proof's workspace mirrors (a top-level
	// group the token reads); Project one of its projects the person pushes
	// to.
	Group   string `yaml:"group,omitempty"`
	Project string `yaml:"project,omitempty"`
	// Person is the GitLab username the proof signs in to GitLab as,
	// connecting the lab's admin; its password is the Secret's
	// WorkspaceGitLabPasswordKey.
	Person string `yaml:"person,omitempty"`
	// TokenSource, ClientSecretSource and PasswordSource are references
	// `beekeeper secret copy` resolves, in the form AIKey.Source takes. Set,
	// every up and platform places them into the Secret; empty, the Secret
	// is placed by hand.
	TokenSource        string `yaml:"tokenSource,omitempty"`
	ClientSecretSource string `yaml:"clientSecretSource,omitempty"`
	PasswordSource     string `yaml:"passwordSource,omitempty"`
	// ProofRepositories are the two projects, <group>/<project>, the
	// workspaces sync and sessions parts mirror on this instance
	// (ValidateProofRepositories); the person pushes to the first.
	ProofRepositories []string `yaml:"proofRepositories,omitempty"`
}

WorkspaceGitLab is the GitLab behind the workspace-manager's provider instance gitlab: its URL and the OAuth application's client id are public and live here; the group access token the sync mirrors with, the OAuth application's secret and the proof person's GitLab password are the Secret WorkspaceGitLabSecretName in the platform namespace (keys WorkspaceGitLabTokenKey, GitHubClientSecretKey and WorkspaceGitLabPasswordKey), which the operator's secret tooling places and agentlab only references. The instance renders once the URL, the client id and the first two keys are in place; the person is what `workspaces-test --part gitlab` signs in to GitLab as.

func (WorkspaceGitLab) Validate added in v0.97.0

func (g WorkspaceGitLab) Validate() error

Validate checks the URL and the sources.

type Workspaces added in v0.88.0

type Workspaces struct {
	// On, `agentlab platform` installs the storage (Storage), its CSI
	// driver behind its mTLS proxy and the StorageClass before the chart, and
	// renders the chart's `workspaces:` block when the chart carries the
	// key.
	Enabled bool `yaml:"enabled"`
	// Provider names the workspace-manager's provider instances:
	// WorkspaceProviderGitHub (a GitHub App of the lab's own on github.com;
	// the default while empty), WorkspaceProviderGitLab (a GitLab the lab
	// reaches, its OAuth application and group access token), or both,
	// comma-separated ("github,gitlab"). With workspaces on, the
	// workspace-manager's public base URL carries the gateway port
	// (WorkspaceManagerBaseURL) and the chart routes its host.
	Provider string `yaml:"provider,omitempty"`
	// GrantProvider is the instance whose App muster pins the
	// workspace-manager's registration to (WorkspaceGrantProvider): a person
	// grants that App once in muster, and muster attaches the person's token
	// for it to every call of the manager's tools. Empty is the first
	// instance of Provider, in the order WorkspaceProviders gives them.
	// WorkspaceGrantProviderApps pins nothing: muster keeps one provider
	// App per instance, side by side (WorkspaceProviderApps), and a person
	// grants each once (core_auth_login app=<instance>); it takes two or
	// more instances.
	GrantProvider string `yaml:"grantProvider,omitempty"`
	// GitHub is the App behind the provider instance github.
	GitHub WorkspaceGitHub `yaml:"github,omitempty"`
	// GitLab is the GitLab behind the provider instance gitlab.
	GitLab WorkspaceGitLab `yaml:"gitlab,omitempty"`
	// SessionsCleanupAfter is how long a Session's directory outlives its
	// last turn, a Go duration the workspace-manager takes as its
	// sessions.cleanupAfter; empty keeps the chart's 30 days. A short window
	// is a proof's: `workspaces-test --part sessions` waits it out once.
	SessionsCleanupAfter string `yaml:"sessionsCleanupAfter,omitempty"`
	// SyncRefreshAfter is the refresh threshold, a Go duration the
	// workspace-manager takes as its sync.refreshAfter: a Session started on
	// a workspace whose last sync is older requests a sync; empty keeps the
	// manager's 1h. A short threshold is a proof's: `workspaces-test --part
	// refresh` lets a workspace pass it.
	SyncRefreshAfter string `yaml:"syncRefreshAfter,omitempty"`
	// CSICompanion runs the connectivity chart's CSI companion
	// (workspaces.substrate.csiCompanion) as Substrate's driver in place of
	// the lab's own registration: its efs preset with the lab's NFS plugin
	// image and arguments, the lab's NFS driver serving the volumes under
	// the preset's driver name. The lab path for proving a companion chart
	// change (docs/workspaces.md); needs a chart that carries the key.
	CSICompanion bool `yaml:"csiCompanion,omitempty"`
	// Storage is what backs the workspaces' volumes: WorkspaceStorageNFS, an
	// NFS server in the cluster and csi-driver-nfs; WorkspaceStorageHostPath,
	// csi-driver-host-path, a directory of the one node per volume,
	// bind-mounted where it is published; or WorkspaceStorageMooseFS, a
	// MooseFS master and chunkserver in the cluster and moosefs-csi, mounted
	// through FUSE. Empty picks moosefs under rootless Podman on Linux,
	// where the kernel refuses nfsd and NFS mounts to the node's user
	// namespace, and nfs elsewhere. hostpath needs the single-node lab
	// (substrateNodes 0); hostpath and moosefs refuse csiCompanion, whose
	// preset mounts the lab's NFS volumes.
	Storage string `yaml:"storage,omitempty"`
}

Workspaces configures the workspace storage in the lab.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL