Documentation
¶
Index ¶
- Constants
- Variables
- type APIServerCertificatePaths
- type AdminCertificatePaths
- type CACertificatePaths
- type CPUManagerConfig
- type CertificatePaths
- type ControllerManagerCertificatePaths
- type D2KCertificatePaths
- type EdgeAgentConfig
- type Embedded
- type KubeletCertificatePaths
- type MetricsConfig
- type RequestHeaderCertificatePaths
- type WebhookCertificatePaths
Constants ¶
const ( DefaultNodeName = "kubesolo-node" DefaultWebhookName = "webhook.kubesolo.io" DefaultSystemCNIDir = "/opt/cni" DefaultEmbeddedCNIDir = "bin/cni" DefaultWebhookPort = 10443 DefaultPKIDir = "pki" DefaultContainerdDir = "containerd" DefaultContainerdSocket = "containerd.sock" DefaultSystemContainerdSock = "/run/containerd/containerd.sock" DefaultStandardCNIConfDir = "/etc/cni/net.d" DefaultContainerdConfigDir = "/etc/containerd/config.d" DefaultCNIConfigName = "10-bridge.conflist" DefaultK8sNamespace = "k8s.io" DefaultKubeletDir = "kubelet" DefaultAPIServerDir = "apiserver" DefaultKineEndpoint = "127.0.0.1:2379" DefaultPodCIDR = "10.42.0.0/16" DefaultServiceClusterIPRange = "10.43.0.0/16" DefaultCoreDNSIP = "10.43.0.10" DefaultKubernetesServiceIP = "10.43.0.1" DefaultKineDir = "kine" DefaultKineSocket = "kine.sock" DefaultControllerManagerDir = "controller-manager" DefaultSandboxImage = "docker.io/portainer/pause:latest" DefaultPortainerEdgeImage = "docker.io/portainer/agent:lts" DefaultCoreDNSImage = "docker.io/coredns/coredns:1.14.4" DefaultLocalPathProvisionerImage = "docker.io/rancher/local-path-provisioner:v0.0.36" DefaultLocalPathStorageDir = "local-path-storage" DefaultD2KImage = "docker.io/portainer/d2k:1.2.3" DefaultD2KPort = int32(2376) DefaultD2KDir = "d2k" DefaultWebhookReadWriteTimeout = 10 * time.Second DefaultWebhookIdleTimeout = 30 * time.Second DefaultContextTimeout = 60 * time.Second DefaultComponentSleep = 5 * time.Second DefaultStartupTimeout = 600 // seconds DefaultNftMasqTable = "kubesolo-masq" DefaultMTU = 1500 // fallback when MTU detection fails DefaultMetricsBindAddress = "127.0.0.1:9105" DefaultMetricsProbeInterval = 15 * time.Second DefaultKineDBFile = "state.db" )
const ( CPUManagerPolicyNone = "none" CPUManagerPolicyStatic = "static" )
CPU manager policies. With the static policy, Guaranteed-QoS pods that request whole CPUs get exclusive cores instead of sharing the CFS quota pool.
Variables ¶
var ( KubesoloKineDir = filepath.Join(DefaultKineDir, "db") KubesoloControllerManagerDir = filepath.Join(DefaultControllerManagerDir, "config") KubesoloWebhookDir = filepath.Join(DefaultPKIDir, "webhook") // DefaultRetryCount is the number of health-check retries per component. // Derived from --startup-timeout at startup: timeout / DefaultComponentSleep. DefaultRetryCount = DefaultStartupTimeout / int(DefaultComponentSleep.Seconds()) )
Functions ¶
This section is empty.
Types ¶
type APIServerCertificatePaths ¶
type APIServerCertificatePaths struct {
CertificatePaths
}
APIServerCertificatePaths defines paths for API server certificates
type AdminCertificatePaths ¶
type AdminCertificatePaths struct {
CertificatePaths
}
AdminCertificatePaths defines paths for admin certificates
type CACertificatePaths ¶
CACertificatePaths defines paths for CA certificates
type CPUManagerConfig ¶ added in v1.2.0
CPUManagerConfig contains the kubelet CPU manager settings. With Policy set to CPUManagerPolicyStatic, Guaranteed-QoS pods requesting whole CPUs are given exclusive cores. ReservedCPUs is the cpuset held back for the system and kubesolo itself, which the static policy requires to be non-empty.
type CertificatePaths ¶
CertificatePaths defines the paths for a specific certificate type
type ControllerManagerCertificatePaths ¶
type ControllerManagerCertificatePaths struct {
CertificatePaths
}
ControllerManagerCertificatePaths defines paths for controller manager certificates
type D2KCertificatePaths ¶ added in v1.1.7
type D2KCertificatePaths struct {
CACert string
ServerCert string
ServerKey string
ClientCert string
ClientKey string
}
D2KCertificatePaths defines paths for the d2k TLS material. CACert is the kubesolo CA certificate that signs both server and client certs; it is the existing /var/lib/kubesolo/pki/ca/ca.crt and is referenced by docker CLI clients via --tlscacert. ServerCert/ServerKey are mounted into the d2k pod as /etc/d2k/tls/tls.crt and tls.key. ClientCert/ClientKey are used by docker CLI clients via --tlscert and --tlskey.
type EdgeAgentConfig ¶
type EdgeAgentConfig struct {
Image string
EdgeID string
EdgeKey string
EdgeAsync bool
EdgeInsecurePoll string
EdgeSecret string
EnvVars map[string]string
}
EdgeAgentConfig contains configuration for Portainer Edge Agent
type Embedded ¶
type Embedded struct {
// System Node IP
NodeIP string
// NodeIPSpecified is true when the node IP was explicitly set via --node-ip
// (rather than auto-detected). When set, the API server cert SANs are scoped
// to this IP instead of every local interface address.
NodeIPSpecified bool
// Network MTU used by the embedded CNI bridge (cni0) and pod veth interfaces
MTU int
// MTUSpecified is true when the MTU was explicitly set via --mtu (rather
// than auto-detected).
MTUSpecified bool
// PKI directories
PKIDir string
PKICADir string
PKIAdminDir string
PKIAPIServerDir string
PKIControllerDir string
PKIKubeletDir string
PKIWebhookDir string
PKIRequestHeaderDir string
// Admin kubeconfig file
AdminKubeconfigFile string
// Certificate paths
KubeletCerts KubeletCertificatePaths
APIServerCerts APIServerCertificatePaths
ControllerManagerCerts ControllerManagerCertificatePaths
AdminCerts AdminCertificatePaths
WebhookCerts WebhookCertificatePaths
CACerts CACertificatePaths
RequestHeaderCerts RequestHeaderCertificatePaths
// Containerd directories and files
ContainerdDir string
ContainerdSocketFile string
ContainerdBinaryFile string
ContainerdImagesDir string
ContainerdConfigFile string
ContainerdShimBinaryFile string
ContainerdRootDir string
ContainerdStateDir string
ContainerdRegistryConfigDir string
// Conitainerd CNI directories and files
ContainerdCNIDir string
ContainerdCNIPluginsDir string
ContainerdCNIConfigDir string
ContainerdCNIConfigFile string
// Crun binary
CrunBinaryFile string
// Container runtime. RuntimeExternal is true when KubeSolo attaches to a
// host-managed CRI runtime given with --container-runtime-endpoint instead of
// starting its own embedded containerd. RuntimeEndpoint is populated in both
// cases — for the embedded containerd it is "unix://" + ContainerdSocketFile —
// so consumers need only one code path. RuntimeSocketPath is the filesystem
// path of RuntimeEndpoint.
// RuntimeCgroupDriver is the cgroup driver reported by an external runtime over
// CRI, which the kubelet must match. Empty when the runtime does not report one,
// in which case the kubelet detects the driver from the host instead.
RuntimeExternal bool
RuntimeEndpoint string
RuntimeSocketPath string
RuntimeCgroupDriver string
// Kubelet directories
KubeletDir string
KubeletConfigDir string
KubeletConfigFile string
KubeletKubeConfigFile string
KubeletPluginsDir string
// API Server directory
APIServerDir string
ServiceAccountKeyFile string
// API Server extra SANs
APIServerExtraSANs []string
// Kine directories and files
KineDir string
KineSocketFile string
// Controller manager directory
ControllerDir string
// Webhook directory
WebhookDir string
// Images
PortainerEdgeImageFile string
CorednsImageFile string
SandboxImageFile string
LocalPathProvisionerImageFile string
D2KImageFile string
// Load Balancer
LoadBalancer bool
// LoadBalancerIP is the IP published as the LoadBalancer EXTERNAL-IP.
// Defaults to NodeIP unless overridden with --load-balancer-ip.
LoadBalancerIP string
// Local Path Storage
LocalPathStorageDir string
// Portainer Edge
IsPortainerEdge bool
PortainerEdgeImage string
// Container Mode
ContainerMode bool
// IPv6
DisableIPv6 bool
// d2k integration
D2K bool
D2KNamespace string
D2KCerts D2KCertificatePaths
// Metrics endpoint configuration
Metrics MetricsConfig
// CPU manager configuration
CPUManager CPUManagerConfig
// SystemReserved is the resource list withheld from node allocatable for the
// host, e.g. {"cpu": "1", "memory": "500Mi"}
SystemReserved map[string]string
}
type KubeletCertificatePaths ¶
type KubeletCertificatePaths struct {
CertificatePaths
}
KubeletCertificatePaths defines paths for kubelet certificates
type MetricsConfig ¶ added in v1.2.0
MetricsConfig contains configuration for the kubesolo Prometheus metrics endpoint. When Enabled is true, kubesolo serves a /metrics HTTP endpoint exposing control plane health gauges, kine DB size, and build info.
type RequestHeaderCertificatePaths ¶
type RequestHeaderCertificatePaths struct {
CACert string
CAKey string
ClientCert string
ClientKey string
}
RequestHeaderCertificatePaths defines paths for request header CA and client certificates
type WebhookCertificatePaths ¶
type WebhookCertificatePaths struct {
CertificatePaths
}
WebhookCertificatePaths defines paths for webhook certificates