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
- Variables
- func BackendPort(backend string) int
- func BackendServerName(backend string) string
- func BranchHash(branch string) string
- func CodingChartRuntime(runtime string) string
- func CodingHarnessDevImage(runtime string) string
- func ConnectivityChartDir(chartPath string) string
- func GitHubFakeBearerAPIHost(domain string) string
- func GitHubFakeBearerHost(domain string) string
- func GitHubFakeHost(domain string) string
- func MajorOf(version string) uint64
- func RegistryDevImage(component string) bool
- func SanitizeBranch(branch string) string
- func ValidateAIModel(s string) error
- func ValidateAPIKeyEnv(s string) error
- func ValidateChartBranch(s string) error
- func ValidateChartVersion(s string) error
- func ValidateClusterName(s string) error
- func ValidateImageRef(s string) error
- func ValidateModelName(s string) error
- func ValidateNodePort(s string) error
- func ValidatePort(s string) error
- func ValidateSecretSource(s string) error
- type AIKey
- type Backstage
- type Coding
- type Config
- func (c *Config) AdminUser() *User
- func (c *Config) AgentgatewayBaseURL() string
- func (c *Config) AlertmanagerEnabled() bool
- func (c *Config) BackstageBaseURL() string
- func (c *Config) BackstageDirectURL() string
- func (c *Config) ChartBackends() []string
- func (c *Config) ChartChannel() string
- func (c *Config) ChartMajor() uint64
- func (c *Config) CheckFamiliesChartFloor() error
- func (c *Config) CheckValuesFiles() error
- func (c *Config) ChooseFreePorts(ours map[int]bool, recorded map[int]string, minPublishable int) []PortChange
- func (c *Config) ClusterManagerEnabled() bool
- func (c *Config) CodexModelConfig() string
- func (c *Config) CodingEnabled() bool
- func (c *Config) CodingHarnessImage(runtime string) string
- func (c *Config) CodingHarnessRendered(runtime string) bool
- func (c *Config) CodingHarnesses() []string
- func (c *Config) ControlPlaneNode() string
- func (c *Config) DexHost() string
- func (c *Config) EnsureHashes() (changed bool, err error)
- func (c *Config) FamilylessChart() bool
- func (c *Config) FindUser(email string) *User
- func (c *Config) FindUserInGroup(group string) *User
- func (c *Config) GatewayURL(prefix string) string
- func (c *Config) GitHubFakeBearerAPIURL() string
- func (c *Config) GitHubFakeBearerURL() string
- func (c *Config) GitHubFakeURL() string
- func (c *Config) GitHubSignInCallbackURL() string
- func (c *Config) GitHubSignInEnabled() bool
- func (c *Config) HostPorts() []int
- func (c *Config) Issuer() string
- func (c *Config) KagentUIBaseURL() string
- func (c *Config) KlausGatewayEnabled() bool
- func (c *Config) LegacyChart() bool
- func (c *Config) MCPServerName() string
- func (c *Config) ModelManagerEnabled() bool
- func (c *Config) MusterBaseURL() string
- func (c *Config) MusterDirectURL() string
- func (c *Config) MusterReplicas() int
- func (c *Config) Normalize()
- func (c *Config) ObservabilityBaseURL() string
- func (c *Config) PlatformManagerVersion() string
- func (c *Config) PortConflicts(ours map[int]bool) []PortConflict
- func (c *Config) PrometheusMCPServerName() string
- func (c *Config) Save() error
- func (c *Config) ServingEnabled() bool
- func (c *Config) SkillsGitHubApp() GitHubApp
- func (c *Config) SubstrateNodeNames() []string
- func (c *Config) TenantsEnabled() bool
- func (c *Config) VMManagerEnabled() bool
- func (c *Config) Validate() error
- func (c *Config) WorkspaceFakeBearerProvider() bool
- func (c *Config) WorkspaceFakeProvider() bool
- func (c *Config) WorkspaceGitHubProvider() bool
- func (c *Config) WorkspaceGitLabProvider() bool
- func (c *Config) WorkspaceGrantProvider() string
- func (c *Config) WorkspaceManagerBaseURL() string
- func (c *Config) WorkspaceProviders() []string
- func (c *Config) WorkspacesCSICompanion() bool
- func (c *Config) WorkspacesEnabled() bool
- type ExtraModel
- type GitHub
- type GitHubApp
- type GitHubSignIn
- type GitHubToken
- type KlausGateway
- type ModelManager
- type Platform
- type PlatformManager
- type PlatformTLS
- type PortChange
- type PortConflict
- type SecretRef
- type Serving
- type Tenants
- type User
- type VMManager
- type WorkspaceGitHub
- type WorkspaceGitLab
- type Workspaces
Constants ¶
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.
const ( OllamaPort = 11434 LemonadePort = 13305 LMStudioPort = 1234 )
The servers' default API ports, the ones the autodetected endpoints assume.
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.
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).
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).
const ( WorkspaceProviderFake = "fake" WorkspaceProviderFakeBearer = "fake-bearer" WorkspaceProviderGitHub = "github" WorkspaceProviderGitLab = "gitlab" WorkspaceFakeSecretName = "workspace-fake" // #nosec G101 -- Secret NAME, not a credential 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: the fake's holds the key pair and client secret the lab generated itself (certs/github-fake), the github instance's what the operator's secret tooling placed. Both carry the same keys, and the values only ever reference them.
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).
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.
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.
const ( PortalAgentPlatform = "agent-platform" PortalClassic = "classic" )
The Backstage portal modes (backstage.portal).
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.
const APIFormatResponses = "responses"
APIFormatResponses is openAI.apiFormat for the Responses API.
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.
const ChartRepository = "oci://gsoci.azurecr.io/charts/giantswarm/agent-platform"
ChartRepository is where the agent-platform chart releases live.
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).
const DefaultAPIServerPort = 6443
DefaultAPIServerPort is the host port of the lab's Kubernetes API server when agentlab.yaml sets none.
const DefaultChartVersion = "4.142.0"
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).
const DefaultClusterName = "agentlab"
DefaultClusterName is a new lab's clusterName when no other lab on the machine holds it.
const DefaultDevRegistryPort = 5001
DefaultDevRegistryPort is the host port of the lab registry when agentlab.yaml sets none: kind's documented local-registry port.
const DefaultDexPort = 32000
DefaultDexPort is the lab Dex NodePort when agentlab.yaml sets none.
const DefaultPlatformManagerVersion = "0.69.0"
DefaultPlatformManagerVersion is the giantswarm-platform-manager release pm-test installs while platform.platformManager.version is empty: a stable release of the chart and image on gsoci.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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).
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.
const SubstrateNodeKey = "agentlab.giantswarm.io/substrate-worker"
SubstrateNodeKey is the label and the NoSchedule taint (value "true") of the substrateNodes workers.
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 ¶
var APIFormats = []string{"chatCompletions", APIFormatResponses}
APIFormats is the ModelConfig CRD's enum for openAI.apiFormat.
var CodingRuntimes = []string{CodingRuntimeClaude, CodingRuntimeCodex, CodingRuntimeOmp}
CodingRuntimes are the runtimes platform.coding.harnesses takes.
var DevImageComponents = []string{"muster", "backstage", "kagent", "mcp-kubernetes", "model-manager", "agent-manager", "vm-manager", DevImageKlausGateway, DevImageClusterManager, DevImageWorkspaceManager, DevImageAgentgateway, DevImageAgentgatewayController, DevImageSubstrateAPI, DevImageMCPPrometheus, DevImageHarness, DevImageClaudeHarness, DevImageCodexHarness, DevImageOmpHarness}
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).
var Groups = []string{groupPlatformAdmins, groupDevelopers, groupViewers}
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.
var ModelProviderNames = []string{ProviderOpenAI, ProviderAnthropic, ProviderGemini, ProviderOllama}
ModelProviderNames is ModelProviders' keys in a stable order, for the form options and error messages.
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).
var PinnedNodePorts = []int{MusterNodePort, KagentUINodePort, GatewayNodePort, GatewayPublicNodePort}
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.
var PortalModes = []string{PortalAgentPlatform, PortalClassic}
PortalModes lists the portal modes, the default first.
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).
var WorkspaceOrganizationGroups = []string{groupPlatformAdmins, groupDevelopers}
Functions ¶
func BackendPort ¶ added in v0.15.0
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
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
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
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
CodingHarnessDevImage is the devImages key of a coding runtime's image.
func ConnectivityChartDir ¶ added in v0.53.2
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 GitHubFakeBearerAPIHost ¶ added in v0.102.0
GitHubFakeBearerAPIHost is the API host of the instance fake-bearer.
func GitHubFakeBearerHost ¶ added in v0.102.0
GitHubFakeBearerHost is the git host of the lab's GitHub as the github.com-shaped instance fake-bearer, GitHubFakeBearerAPIHost its API host beside it, as api.github.com is beside github.com: the API takes a Bearer credential on a host of its own, the git host Basic. Both are names of the same fake, under the platform domain like GitHubFakeHost.
func GitHubFakeHost ¶ added in v0.89.0
GitHubFakeHost is the lab's GitHub's name under the platform domain (`agentlab github-fake --workspaces`, docs/workspaces.md): the one the lab CA's name constraints admit, pods resolve to the fake and its TLS leaf carries.
func MajorOf ¶ added in v0.51.0
MajorOf is the major of an exact chart version (a leading v tolerated), 0 when the string is not one.
func RegistryDevImage ¶ added in v0.109.0
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
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 ¶
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
ValidateAPIKeyEnv accepts an env var name or empty (keyless endpoint).
func ValidateChartBranch ¶ added in v0.27.0
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
ValidateChartVersion accepts an exact chart version only.
func ValidateClusterName ¶
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
ValidateImageRef accepts an image reference that names its tag or digest.
func ValidateModelName ¶ added in v0.10.0
ValidateModelName is the one home of the extra-model-name rule; the huh form uses it directly as an input validator.
func ValidateNodePort ¶
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 ValidateSecretSource ¶ added in v0.84.6
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.
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
AgentPlatformPortal reports whether the portal serves the Agent Platform shell (app.portals.agentPlatform).
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 GitHub calls 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 ¶
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
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 Peek ¶ added in v0.62.0
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.
func (*Config) AdminUser ¶
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
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
AlertmanagerEnabled reports whether the lab runs the Alertmanager: the platform with its observability stack, and the key on.
func (*Config) BackstageBaseURL ¶
BackstageBaseURL is Backstage's public URL through the agentgateway edge.
func (*Config) BackstageDirectURL ¶
BackstageDirectURL bypasses the edge (hostNetwork port mapping), kept for debugging.
func (*Config) ChartBackends ¶ added in v0.52.0
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
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
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) CheckFamiliesChartFloor ¶ added in v0.64.0
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
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) ChooseFreePorts ¶ added in v0.7.0
func (c *Config) ChooseFreePorts(ours map[int]bool, recorded map[int]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 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
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
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
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
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
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
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 ¶
ControlPlaneNode is the docker container name kind gives the (only) node.
func (*Config) DexHost ¶ added in v0.72.0
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 ¶
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) FamilylessChart ¶ added in v0.82.0
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) FindUserInGroup ¶ added in v0.13.0
FindUserInGroup returns the first user carrying group, or nil.
func (*Config) GatewayURL ¶ added in v0.88.0
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) GitHubFakeBearerAPIURL ¶ added in v0.102.0
GitHubFakeBearerAPIURL is the instance fake-bearer's REST API base URL, at the root of its own host as https://api.github.com is.
func (*Config) GitHubFakeBearerURL ¶ added in v0.102.0
GitHubFakeBearerURL is the instance fake-bearer's web URL, its git host.
func (*Config) GitHubFakeURL ¶ added in v0.89.0
GitHubFakeURL is the lab's GitHub as its provider instance names it, the git host; the REST API is under /api/v3 of it, as on a GitHub Enterprise Server. Pods reach it on 443 (CoreDNS sends the name to the fake's Service); this host reaches the fake on the port its container publishes.
func (*Config) GitHubSignInCallbackURL ¶ added in v0.86.0
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
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
HostPorts returns every host-side port the configuration owns: what another lab on this machine must not use while this one may come up.
func (*Config) Issuer ¶
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 (*Config) KlausGatewayEnabled ¶ added in v0.45.0
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
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 ¶
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
ModelManagerEnabled reports whether the platform installs model-manager.
func (*Config) MusterBaseURL ¶
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 ¶
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
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
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) PlatformManagerVersion ¶ added in v0.90.0
PlatformManagerVersion is the manager release pm-test installs.
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 publishes). Nothing is changed.
func (*Config) PrometheusMCPServerName ¶ added in v0.64.0
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) ServingEnabled ¶ added in v0.52.0
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
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
SubstrateNodeNames are the container (and Node) names kind gives the substrateNodes workers: <cluster>-worker, <cluster>-worker2, …
func (*Config) TenantsEnabled ¶ added in v0.110.0
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
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) WorkspaceFakeBearerProvider ¶ added in v0.102.0
WorkspaceFakeBearerProvider reports whether the workspace-manager gets the provider instance fake-bearer, the lab's GitHub as a github.com-shaped instance: workspaces on and platform.workspaces.provider naming it.
func (*Config) WorkspaceFakeProvider ¶ added in v0.89.0
WorkspaceFakeProvider reports whether the workspace-manager gets the provider instance fake, the lab's own GitHub: workspaces on and platform.workspaces.provider naming it or empty.
func (*Config) WorkspaceGitHubProvider ¶ added in v0.89.0
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
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
WorkspaceGrantProvider is the instance muster pins the workspace-manager's registration to: platform.workspaces.grantProvider, or the first instance; "" with workspaces off.
func (*Config) WorkspaceManagerBaseURL ¶ added in v0.89.0
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) WorkspaceProviders ¶ added in v0.89.0
WorkspaceProviders names the workspace-manager's provider instances, in the order it gets them: what platform.workspaces.provider names, the fake alone while it is empty; none with workspaces off. A value Validate refused yields none too.
func (*Config) WorkspacesCSICompanion ¶ added in v0.100.0
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
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 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"`
// 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) 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).
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
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
Configured reports whether any part of the App is recorded; Validate refuses a partial one.
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 GitHub token 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"`
// 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"`
// 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"`
// 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"`
// The platform-manager fixture: an invented installation with the agent
// platform and workspaces on, in a registry the lab serves, that the
// released giantswarm-platform-manager plans against
// (internal/lab/pmtest.go). Off by default; `agentlab pm-test` is the
// proof and refuses while it is off.
PlatformManager PlatformManager `yaml:"platformManager"`
}
type PlatformManager ¶ added in v0.90.0
type PlatformManager struct {
// On, `agentlab pm-test` runs: the manager's chart at Version as a
// temporary HelmRelease against the lab's registry fixture.
Enabled bool `yaml:"enabled"`
// Version is the giantswarm-platform-manager chart (and image) version,
// a release, a release candidate or a branch's dev build; empty is
// DefaultPlatformManagerVersion.
Version string `yaml:"version,omitempty"`
}
PlatformManager configures the platform-manager fixture.
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
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
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 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
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.
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"`
}
WorkspaceGitHub is the lab's GitHub App for 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"`
}
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 NFS server, the NFS 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:
// WorkspaceProviderFake (the lab's own GitHub, served for the lab as a
// GitHub Enterprise-shaped instance; the default while empty),
// WorkspaceProviderFakeBearer (the same GitHub as a github.com-shaped
// instance, its API on a host of its own; only beside the fake),
// WorkspaceProviderGitHub (a GitHub App of the lab's own on github.com),
// WorkspaceProviderGitLab (a GitLab the lab reaches, its OAuth
// application and group access token), or several, comma-separated
// ("fake,fake-bearer,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.
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"`
}
Workspaces configures the workspace storage in the lab.