config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config defines the intermediate representation (IR) for agent configuration. These types are the shared contract between the agent library and its consumers.

Consumers should define their own public-facing configuration representation and translate to/from these IR types. For example, AKS Flex Node maintains its own JSON config schema and maps it to these structs before calling agent library functions.

TODO: the versioning and stability guarantees for this package are not yet finalized and will be revisited in a future iteration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentClusterConfig

type AgentClusterConfig struct {
	CaCertBase64 string `json:"CaCertBase64"`
	ClusterDNS   string `json:"ClusterDNS"`
	Version      string `json:"Version"`
}

AgentClusterConfig holds the cluster-level values the agent needs to join the Kubernetes control plane.

type AgentConfig

type AgentConfig struct {
	MachineName string             `json:"MachineName"`
	Cluster     AgentClusterConfig `json:"Cluster"`
	Kubelet     AgentKubeletConfig `json:"Kubelet"`
	CRI         CRIConfig          `json:"CRI"`
	CNI         CNIConfig          `json:"CNI"`

	// OCIImage is the fully-qualified OCI image reference (e.g.
	// "ghcr.io/org/repo:tag") used to bootstrap the machine rootfs.
	// When empty the agent falls back to debootstrap.
	OCIImage string `json:"OCIImage,omitempty"`
}

AgentConfig is the core configuration needed to bootstrap a Kubernetes node. It contains only the cloud-agnostic fields required by the shared agent library. Platform-specific extensions (e.g. attestation, cloud provider identity) should be defined in the consuming application.

type AgentKubeletConfig

type AgentKubeletConfig struct {
	ApiServer          string            `json:"ApiServer"`
	Auth               KubeletAuthInfo   `json:"Auth"`
	Labels             map[string]string `json:"Labels"`
	RegisterWithTaints []string          `json:"RegisterWithTaints"`
}

AgentKubeletConfig holds kubelet-specific overrides.

type CNIConfig

type CNIConfig struct {
	// PluginVersion overrides the default CNI plugin version (e.g. "1.5.1").
	PluginVersion string `json:"PluginVersion,omitempty"`
}

CNIConfig holds CNI plugin version overrides. Zero values fall back to the library defaults in goalstates/constants.go.

type CRIConfig

type CRIConfig struct {
	Containerd ContainerdConfig `json:"Containerd"`
	Runc       RuncConfig       `json:"Runc"`
}

CRIConfig holds container runtime version overrides. Zero values fall back to the library defaults in goalstates/constants.go.

type ContainerdConfig

type ContainerdConfig struct {
	// Version overrides the default containerd version (e.g. "2.0.4").
	Version string `json:"Version,omitempty"`
}

ContainerdConfig holds containerd-specific overrides.

type KubeletAuthInfo

type KubeletAuthInfo struct {
	// BootstrapToken is a Kubernetes bootstrap token in
	// "<token-id>.<token-secret>" format used for TLS bootstrapping.
	BootstrapToken string `json:"BootstrapToken,omitempty"`

	// ExecCredential configures kubelet to authenticate via a
	// client.authentication.k8s.io exec credential plugin.
	ExecCredential *clientcmdapi.ExecConfig `json:"ExecCredential,omitempty"`
}

KubeletAuthInfo holds the kubelet authentication configuration. Exactly one of BootstrapToken or ExecCredential must be set.

func (*KubeletAuthInfo) Validate

func (a *KubeletAuthInfo) Validate() error

Validate checks that exactly one auth method is configured.

type RuncConfig

type RuncConfig struct {
	// Version overrides the default runc version (e.g. "1.1.12").
	Version string `json:"Version,omitempty"`
}

RuncConfig holds runc-specific overrides.

Jump to

Keyboard shortcuts

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