kubernetes

package
v1.14.1-0...-7f8ff72 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminConf      = "admin.conf"
	ControllerConf = "controller-manager.conf"
	SchedulerConf  = "scheduler.conf"
	KubeletConf    = "kubelet.conf"
)
View Source
const Distribution = "kubernetes"

Variables

View Source
var (
	V1130 = semver.MustParse("v1.13.0")
	V1150 = semver.MustParse("v1.15.0")
	V1220 = semver.MustParse("v1.22.0")
	V1250 = semver.MustParse("v1.25.0")
	V1260 = semver.MustParse("v1.26.0")
	V1270 = semver.MustParse("v1.27.0")
	V1280 = semver.MustParse("v1.28.0")
)
View Source
var MasterStaticFiles = []*StaticFile{
	{
		DestinationDir: "/etc/kubernetes",
		Name:           auditPolicyYml,
	},
}

MasterStaticFiles Put static files here, can be moved to all master nodes before kubeadm execution

Functions

This section is empty.

Types

type CommandType

type CommandType int
const (
	InitMaster CommandType = iota
	JoinMaster
	JoinNode
	UpdateCluster
)

type KubeadmRuntime

type KubeadmRuntime struct {
	// contains filtered or unexported fields
}

func New

func New(cluster *v2.Cluster, config any) (*KubeadmRuntime, error)

func (*KubeadmRuntime) Command

func (k *KubeadmRuntime) Command(cmdType CommandType) (cmd string)

func (*KubeadmRuntime) CompleteKubeadmConfig

func (k *KubeadmRuntime) CompleteKubeadmConfig(fns ...func(*KubeadmRuntime) error) error

func (*KubeadmRuntime) ConfigJoinMasterKubeadmToMaster

func (k *KubeadmRuntime) ConfigJoinMasterKubeadmToMaster(master string) error

func (*KubeadmRuntime) CopyStaticFilesToMasters

func (k *KubeadmRuntime) CopyStaticFilesToMasters() error

func (*KubeadmRuntime) CreateKubeConfigFiles

func (k *KubeadmRuntime) CreateKubeConfigFiles() error

func (*KubeadmRuntime) GenerateCert

func (k *KubeadmRuntime) GenerateCert() error

func (*KubeadmRuntime) GetRawConfig

func (k *KubeadmRuntime) GetRawConfig() ([]byte, error)

func (*KubeadmRuntime) Init

func (k *KubeadmRuntime) Init() error

func (*KubeadmRuntime) InitCertsAndKubeConfigs

func (k *KubeadmRuntime) InitCertsAndKubeConfigs() error

func (*KubeadmRuntime) InitKubeadmConfigToMaster0

func (k *KubeadmRuntime) InitKubeadmConfigToMaster0() error

func (*KubeadmRuntime) InitMaster0

func (k *KubeadmRuntime) InitMaster0() error

func (*KubeadmRuntime) MergeKubeadmConfig

func (k *KubeadmRuntime) MergeKubeadmConfig() error

MergeKubeadmConfig Unsafe, dangerous use of goroutines.

func (*KubeadmRuntime) Renew

func (k *KubeadmRuntime) Renew() error

func (*KubeadmRuntime) Reset

func (k *KubeadmRuntime) Reset() error

func (*KubeadmRuntime) ScaleDown

func (k *KubeadmRuntime) ScaleDown(deleteMastersIPList []string, deleteNodesIPList []string) error

func (*KubeadmRuntime) ScaleUp

func (k *KubeadmRuntime) ScaleUp(newMasterIPList []string, newNodeIPList []string) error

func (*KubeadmRuntime) SendJoinMasterKubeConfigs

func (k *KubeadmRuntime) SendJoinMasterKubeConfigs(masters []string, files ...string) error

func (*KubeadmRuntime) SyncNodeIPVS

func (k *KubeadmRuntime) SyncNodeIPVS(mastersIPList, nodeIPList []string) error

func (*KubeadmRuntime) UpdateCertSANs

func (k *KubeadmRuntime) UpdateCertSANs(certSans []string) error

func (*KubeadmRuntime) Upgrade

func (k *KubeadmRuntime) Upgrade(version string) error

func (*KubeadmRuntime) Validate

func (k *KubeadmRuntime) Validate() error

type StaticFile

type StaticFile struct {
	DestinationDir string
	Name           string
}

StaticFile :static file should not be template, will never be changed while initialization.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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