Documentation ¶
Index ¶
Constants ¶
View Source
const ( RKE2DistributionName = "rke2" K3SDistributionName = "k3s" KubeAdmDistributionName = "kubeadm" MicroK8SDistributionName = "microk8s" ExternalDistributionName = "external" )
Variables ¶
View Source
var SupportedKubernetesDistribution = []string{ RKE2DistributionName, K3SDistributionName, KubeAdmDistributionName, MicroK8SDistributionName, ExternalDistributionName, }
Functions ¶
This section is empty.
Types ¶
type CommonJoinConfig ¶
type ExternalJoinConfig ¶
type ExternalJoinConfig struct { CommonJoinConfig JoinCommand string `json:"join-command,omitempty"` LeaveCommand string `json:"leave-command,omitempty"` ConfigPath string `json:"config-path,omitempty"` ExtraConfig MapAny `json:"extra-config,omitempty"` }
type GetStringFunc ¶
type GetStringFunc func() string
type K3SJoinConfig ¶
type K3SJoinConfig struct { CommonJoinConfig ExtraCommands []string `json:"extras-commands,omitempty"` }
type KubeJoinConfig ¶
type KubeJoinConfig struct { CommonJoinConfig CACert string `json:"ca,omitempty"` ExtraArguments []string `json:"extras-args,omitempty"` }
KubeJoinConfig give element to join kube master
type KubernetesProvider ¶
type KubernetesProvider interface { PrepareNodeCreation(c client.ClientGenerator) error PrepareNodeDeletion(c client.ClientGenerator, powered bool) error JoinCluster(c client.ClientGenerator) error UploadImageCredentialProviderConfig() error PutConfigInCloudInit(cloudInit cloudinit.CloudInit) error PutImageCredentialProviderConfigInCloudInit(cloudInit cloudinit.CloudInit) error }
func NewKubernetesProvider ¶
func NewKubernetesProvider(configuration KubernetesServerConfig, controlPlane bool, maxPods int, nodeName, providerID, address GetStringFunc, timeout time.Duration) (provider KubernetesProvider)
type KubernetesServerConfig ¶
type KubernetesServerConfig interface { GetExternalConfig() *ExternalJoinConfig GetK3SJoinConfig() *K3SJoinConfig GetKubeAdmConfig() *KubeJoinConfig GetMicroK8SConfig() *MicroK8SJoinConfig GetRKE2Config() *RKE2JoinConfig GetCloudInitFileOwner() string GetCloudInitFileMode() uint KubernetesDistribution() string UseCloudInitToConfigure() bool UseControllerManager() bool DisableCloudController() bool GetCloudProviderName() string UseImageCredentialProviderConfig() bool UseExternalEtdcServer() bool GetExtDestinationEtcdSslDir() string GetExtSourceEtcdSslDir() string GetKubernetesPKISourceDir() string GetKubernetesPKIDestDir() string GetSSHConfig() *sshutils.AutoScalerServerSSH GetCredentialProviderConfig() any GetImageCredentialProviderConfig() string GetImageCredentialProviderBinDir() string }
type MicroK8SJoinConfig ¶
type MicroK8SJoinConfig struct { CommonJoinConfig UseLoadBalancer bool `json:"use-nlb"` LoadBalancerAddresses []string `json:"nlb-ips,omitempty"` Channel string `json:"channel,omitempty"` OverrideConfig MapAny `json:"override-config,omitempty"` }
type RKE2JoinConfig ¶
type RKE2JoinConfig struct { CommonJoinConfig ExtraCommands []string `json:"extras-commands,omitempty"` }
Click to show internal directories.
Click to hide internal directories.