types

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
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"
	DefaultPortainerAgentImage       = "docker.io/portainer/agent:2.39.4"
	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"
)

Variables

View Source
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

type CACertificatePaths struct {
	Cert string
	Key  string
}

CACertificatePaths defines paths for CA certificates

type CertificatePaths

type CertificatePaths struct {
	CACert string
	Cert   string
	Key    string
}

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 {
	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

	// 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

	// 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
	PortainerAgentImageFile       string
	CorednsImageFile              string
	SandboxImageFile              string
	LocalPathProvisionerImageFile string
	D2KImageFile                  string

	// Load Balancer
	LoadBalancer bool

	// Local Path Storage
	LocalPathStorageDir string

	// Portainer Edge
	IsPortainerEdge bool

	// Container Mode
	ContainerMode bool

	// IPv6
	DisableIPv6 bool

	// d2k integration
	D2K          bool
	D2KNamespace string
	D2KCerts     D2KCertificatePaths
}

type KubeletCertificatePaths

type KubeletCertificatePaths struct {
	CertificatePaths
}

KubeletCertificatePaths defines paths for kubelet certificates

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

Jump to

Keyboard shortcuts

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