kubernetes

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RKE2DistributionName     = "rke2"
	K3SDistributionName      = "k3s"
	KubeAdmDistributionName  = "kubeadm"
	MicroK8SDistributionName = "microk8s"
	ExternalDistributionName = "external"
)

Variables

Functions

This section is empty.

Types

type CommonJoinConfig

type CommonJoinConfig struct {
	Address           string `json:"address,omitempty"`
	Token             string `json:"token,omitempty"`
	DatastoreEndpoint string `json:"datastore-endpoint,omitempty"`
}

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 MapAny

type MapAny map[string]any

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"`
}

Jump to

Keyboard shortcuts

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