Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultVersion = "v1.1.8" DefaultPath = "/var/lib/kubesolo" DefaultInstallPath = "/usr/local/bin/kubesolo" DefaultRunMode = RunModeService AppName = "kubesolo" PIDFile = "/var/run/kubesolo.pid" LogFile = "/var/log/kubesolo.log" // CNIConfigFile is the CNI configuration KubeSolo drops into the standard CNI // directory, as a symlink when it runs its own containerd and as a regular file // when it attaches to a host-managed runtime. Mirrors // types.DefaultStandardCNIConfDir + types.DefaultCNIConfigName in the kubesolo // binary, the same way DefaultPath mirrors its --path default. CNIConfigFile = "/etc/cni/net.d/10-bridge.conflist" // CPUManagerPolicyNone is the default kubelet CPU manager policy, in which every // pod shares all CPUs. Mirrors types.CPUManagerPolicyNone in the kubesolo binary. CPUManagerPolicyNone = "none" // MinD2KVersion is the first KubeSolo release whose binary understands the // --d2k / --d2k-namespace flags (d2k integration landed after v1.1.5). // The installer refuses to pass --d2k to an older binary, which would crash-loop. MinD2KVersion = "v1.1.8" RunModeService = "service" RunModeDaemon = "daemon" RunModeForeground = "foreground" RunModeContainer = "container" // KubeSolo runs inside a container (macOS, Windows WSL2, or Linux with a container engine) // DefaultContainerImage is the container image used in container run mode. DefaultContainerImage = "portainer/kubesolo" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Name identifies this KubeSolo instance. Used as the container name
// and kubeconfig context name. Defaults to AppName ("kubesolo").
Name string
// Version of KubeSolo to install (e.g. "v1.1.8")
Version string
// Path is the base directory KubeSolo stores its data in
Path string
// APIServerExtraSANs is an optional comma-separated list of extra SANs for the API server certificate
APIServerExtraSANs string
// NodeIP optionally overrides the auto-detected node IP (useful on multi-NIC hosts)
NodeIP string
// MTU optionally overrides the auto-detected network MTU used by the embedded
// CNI bridge (cni0) and pod veth interfaces, and — in container run mode —
// the outer Docker network the KubeSolo container itself runs on (the two
// must match; see internal/cli/service/container.go). Empty means auto-detect.
MTU string
// PortainerEdgeID is the Portainer edge agent ID
PortainerEdgeID string
// PortainerEdgeKey is the Portainer edge agent key
PortainerEdgeKey string
// PortainerEdgeAsync enables async mode for the Portainer edge agent
PortainerEdgeAsync bool
// PortainerEdgeImage overrides the image deployed for the Portainer edge agent.
// Empty means the flag is not passed and the KubeSolo binary uses its default.
PortainerEdgeImage string
// LocalStorage enables the local-path storage provisioner
LocalStorage bool
// Debug enables verbose debug logging in the installed KubeSolo process
Debug bool
// PprofServer enables the pprof HTTP server in the installed KubeSolo process
PprofServer bool
// RunMode controls how KubeSolo is started: "service" (default), "daemon", or "foreground"
RunMode string
// Proxy is an optional HTTP/HTTPS proxy URL injected into the service environment
Proxy string
// OfflineInstall is a path to a local binary or tarball to install instead of downloading
OfflineInstall string
// InstallPrereqs causes the installer to automatically install missing OS-level
// prerequisites (e.g. nftables on Alpine Linux) instead of hard-failing
InstallPrereqs bool
// D2K enables the d2k Docker-to-Kubernetes API translator
D2K bool
// D2KNamespace is the namespace d2k is deployed into and translates against
D2KNamespace string
// CPUManagerPolicy selects the kubelet CPU manager policy ("none" or "static").
// The static policy gives Guaranteed-QoS pods requesting whole CPUs exclusive
// cores, and is unsupported in container run mode.
CPUManagerPolicy string
// CPUManagerPolicyOptions is a comma-separated list of key=value options that
// fine-tune the static CPU manager policy
CPUManagerPolicyOptions string
// ReservedCPUs is the cpuset held back for the host and KubeSolo itself, and
// never handed out as an exclusive core (e.g. "0" or "0-1")
ReservedCPUs string
// SystemReserved is a comma-separated ResourceName=Quantity list withheld from
// node allocatable for the host (e.g. "cpu=1,memory=500Mi")
SystemReserved string
// ContainerImage is the container image reference used in container run mode.
// If empty, defaults to DefaultContainerImage:Version.
// Specify a full reference (e.g. "myrepo/kubesolo:custom") to override entirely.
ContainerImage string
// ContainerPorts is a comma-separated list of host↔container port mappings to
// publish in container run mode (e.g. "9001,8080:80,9000-9100,53/udp"). Bare
// ports and ranges map host==container. It is a container-runtime concern and
// is deliberately NOT passed to the kubesolo binary via CmdArgs.
ContainerPorts string
}
Config holds all configuration for the installer, sourced from CLI flags and environment variables. CLI flags take precedence over environment variables.
Click to show internal directories.
Click to hide internal directories.