kubernetes

package
v3.0.8-69cb87a Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 34 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpgradeStepList = []UpgradeStep{
	ToV121,
	ToV122,
}

Functions

func KubeadmUpgradeTasks

func KubeadmUpgradeTasks(runtime connector.Runtime, u *UpgradeKubeMaster) error

func OverrideCoreDNSService

func OverrideCoreDNSService(runtime connector.Runtime, kubeAction common.KubeAction) error

func SetKubeletTasks

func SetKubeletTasks(runtime connector.Runtime, kubeAction common.KubeAction) error

func SyncKubeBinaries

func SyncKubeBinaries(runtime connector.Runtime, binariesMap map[string]*files.KubeBinary) error

SyncKubeBinaries is used to sync kubernetes' binaries to each node.

func SyncKubeConfigTask

func SyncKubeConfigTask(runtime connector.Runtime, kubeAction common.KubeAction) error

Types

type AddWorkerLabel

type AddWorkerLabel struct {
	common.KubeAction
}

func (*AddWorkerLabel) Execute

func (a *AddWorkerLabel) Execute(runtime connector.Runtime) error

type CalculateNextVersion

type CalculateNextVersion struct {
	common.KubeAction
}

func (*CalculateNextVersion) Execute

type ClusterIsExist

type ClusterIsExist struct {
	common.KubePrepare
	Not bool
}

func (*ClusterIsExist) PreCheck

func (c *ClusterIsExist) PreCheck(_ connector.Runtime) (bool, error)

type ClusterNotEqualDesiredVersion

type ClusterNotEqualDesiredVersion struct {
	common.KubePrepare
}

func (*ClusterNotEqualDesiredVersion) PreCheck

func (c *ClusterNotEqualDesiredVersion) PreCheck(runtime connector.Runtime) (bool, error)

type CompareConfigAndClusterInfoModule

type CompareConfigAndClusterInfoModule struct {
	common.KubeModule
}

func (*CompareConfigAndClusterInfoModule) Init

type ConfigureKubernetes

type ConfigureKubernetes struct {
	common.KubeAction
}

func (*ConfigureKubernetes) Execute

func (c *ConfigureKubernetes) Execute(runtime connector.Runtime) error

type ConfigureKubernetesModule

type ConfigureKubernetesModule struct {
	common.KubeModule
}

func (*ConfigureKubernetesModule) Init

func (c *ConfigureKubernetesModule) Init()

type CopyKubeConfigForControlPlane

type CopyKubeConfigForControlPlane struct {
	common.KubeAction
}

func (*CopyKubeConfigForControlPlane) Execute

type DeleteKubeNodeModule

type DeleteKubeNodeModule struct {
	common.KubeModule
}

func (*DeleteKubeNodeModule) Init

func (d *DeleteKubeNodeModule) Init()

type DrainNode

type DrainNode struct {
	common.KubeAction
}

func (*DrainNode) Execute

func (d *DrainNode) Execute(runtime connector.Runtime) error

type EnableKubelet

type EnableKubelet struct {
	common.KubeAction
}

func (*EnableKubelet) Execute

func (e *EnableKubelet) Execute(runtime connector.Runtime) error

type EtcdSecurityEnhancemenAction

type EtcdSecurityEnhancemenAction struct {
	common.KubeAction
	ModuleName string
}

func (*EtcdSecurityEnhancemenAction) Execute

type FindNode

type FindNode struct {
	common.KubeAction
}

func (*FindNode) Execute

func (f *FindNode) Execute(runtime connector.Runtime) error

type GenerateKubeadmConfig

type GenerateKubeadmConfig struct {
	common.KubeAction
	IsInitConfiguration     bool
	WithSecurityEnhancement bool
}

func (*GenerateKubeadmConfig) Execute

func (g *GenerateKubeadmConfig) Execute(runtime connector.Runtime) error

type GenerateKubeletEnv

type GenerateKubeletEnv struct {
	common.KubeAction
}

func (*GenerateKubeletEnv) Execute

func (g *GenerateKubeletEnv) Execute(runtime connector.Runtime) error

type GetClusterStatus

type GetClusterStatus struct {
	common.KubeAction
}

func (*GetClusterStatus) Execute

func (g *GetClusterStatus) Execute(runtime connector.Runtime) error

type InitKubernetesModule

type InitKubernetesModule struct {
	common.KubeModule
}

func (*InitKubernetesModule) Init

func (i *InitKubernetesModule) Init()

type InstallKubeBinariesModule

type InstallKubeBinariesModule struct {
	common.KubeModule
}

func (*InstallKubeBinariesModule) Init

func (i *InstallKubeBinariesModule) Init()

type JoinNode

type JoinNode struct {
	common.KubeAction
}

func (*JoinNode) Execute

func (j *JoinNode) Execute(runtime connector.Runtime) error

type JoinNodesModule

type JoinNodesModule struct {
	common.KubeModule
}

func (*JoinNodesModule) Init

func (j *JoinNodesModule) Init()

type KubeadmInit

type KubeadmInit struct {
	common.KubeAction
}

func (*KubeadmInit) Execute

func (k *KubeadmInit) Execute(runtime connector.Runtime) error

type KubeadmReset

type KubeadmReset struct {
	common.KubeAction
}

func (*KubeadmReset) Execute

func (k *KubeadmReset) Execute(runtime connector.Runtime) error

type KubeadmUpgrade

type KubeadmUpgrade struct {
	common.KubeAction
}

func (*KubeadmUpgrade) Execute

func (k *KubeadmUpgrade) Execute(runtime connector.Runtime) error

type KubectlDeleteNode

type KubectlDeleteNode struct {
	common.KubeAction
}

func (*KubectlDeleteNode) Execute

func (k *KubectlDeleteNode) Execute(runtime connector.Runtime) error

type KubernetesStatus

type KubernetesStatus struct {
	Version        string
	BootstrapToken string
	CertificateKey string
	ClusterInfo    string
	KubeConfig     string
	NodesInfo      map[string]string
}

func NewKubernetesStatus

func NewKubernetesStatus() *KubernetesStatus

func (*KubernetesStatus) LoadKubeConfig

func (k *KubernetesStatus) LoadKubeConfig(runtime connector.Runtime, kubeConf *common.KubeConf) error

func (*KubernetesStatus) SearchClusterInfo

func (k *KubernetesStatus) SearchClusterInfo(runtime connector.Runtime) error

func (*KubernetesStatus) SearchJoinInfo

func (k *KubernetesStatus) SearchJoinInfo(runtime connector.Runtime) error

func (*KubernetesStatus) SearchKubeConfig

func (k *KubernetesStatus) SearchKubeConfig(runtime connector.Runtime) error

func (*KubernetesStatus) SearchNodesInfo

func (k *KubernetesStatus) SearchNodesInfo(_ connector.Runtime) error

func (*KubernetesStatus) SearchVersion

func (k *KubernetesStatus) SearchVersion(runtime connector.Runtime) error

type MasterSecurityEnhancemenAction

type MasterSecurityEnhancemenAction struct {
	common.KubeAction
	ModuleName string
}

func (*MasterSecurityEnhancemenAction) Execute

type NoClusterInfo

type NoClusterInfo struct {
	common.KubePrepare
}

func (*NoClusterInfo) PreCheck

func (n *NoClusterInfo) PreCheck(_ connector.Runtime) (bool, error)

type NodeInCluster

type NodeInCluster struct {
	common.KubePrepare
	Not bool
}

func (*NodeInCluster) PreCheck

func (n *NodeInCluster) PreCheck(runtime connector.Runtime) (bool, error)

type NodesSecurityEnhancemenAction

type NodesSecurityEnhancemenAction struct {
	common.KubeAction
	ModuleName string
}

func (*NodesSecurityEnhancemenAction) Execute

type NotEqualDesiredVersion

type NotEqualDesiredVersion struct {
	common.KubePrepare
}

func (*NotEqualDesiredVersion) PreCheck

func (n *NotEqualDesiredVersion) PreCheck(runtime connector.Runtime) (bool, error)

type NotEqualPlanVersion

type NotEqualPlanVersion struct {
	common.KubePrepare
}

func (*NotEqualPlanVersion) PreCheck

func (n *NotEqualPlanVersion) PreCheck(runtime connector.Runtime) (bool, error)

type ProgressiveUpgradeModule

type ProgressiveUpgradeModule struct {
	common.KubeModule
	Step UpgradeStep
}

func (*ProgressiveUpgradeModule) Init

func (p *ProgressiveUpgradeModule) Init()

func (*ProgressiveUpgradeModule) Until

func (p *ProgressiveUpgradeModule) Until() (*bool, error)

type ReconfigureDNS

type ReconfigureDNS struct {
	common.KubeAction
	ModuleName string
}

func (*ReconfigureDNS) Execute

func (r *ReconfigureDNS) Execute(runtime connector.Runtime) error

type RemoveMasterTaint

type RemoveMasterTaint struct {
	common.KubeAction
}

func (*RemoveMasterTaint) Execute

func (r *RemoveMasterTaint) Execute(runtime connector.Runtime) error

type ResetClusterModule

type ResetClusterModule struct {
	common.KubeModule
}

func (*ResetClusterModule) Init

func (r *ResetClusterModule) Init()

type SaveKubeConfig

type SaveKubeConfig struct {
	common.KubeAction
}

func (*SaveKubeConfig) Execute

func (s *SaveKubeConfig) Execute(runtime connector.Runtime) error

type SaveKubeConfigModule

type SaveKubeConfigModule struct {
	common.KubeModule
}

func (*SaveKubeConfigModule) Init

func (s *SaveKubeConfigModule) Init()

type SecurityEnhancementModule

type SecurityEnhancementModule struct {
	common.KubeModule
	Skip bool
}

func (*SecurityEnhancementModule) Init

func (s *SecurityEnhancementModule) Init()

func (*SecurityEnhancementModule) IsSkip

func (s *SecurityEnhancementModule) IsSkip() bool

type SetCurrentK8sVersion

type SetCurrentK8sVersion struct {
	common.KubeAction
}

func (*SetCurrentK8sVersion) Execute

type SetUpgradePlan

type SetUpgradePlan struct {
	common.KubeAction
	Step UpgradeStep
}

func (*SetUpgradePlan) Execute

func (s *SetUpgradePlan) Execute(_ connector.Runtime) error

type SetUpgradePlanModule

type SetUpgradePlanModule struct {
	common.KubeModule
	Step UpgradeStep
}

func (*SetUpgradePlanModule) Init

func (s *SetUpgradePlanModule) Init()

type StatusModule

type StatusModule struct {
	common.KubeModule
}

func (*StatusModule) Init

func (k *StatusModule) Init()

type SyncKubeBinary

type SyncKubeBinary struct {
	common.KubeAction
}

func (*SyncKubeBinary) Execute

func (i *SyncKubeBinary) Execute(runtime connector.Runtime) error

type SyncKubeConfigToWorker

type SyncKubeConfigToWorker struct {
	common.KubeAction
}

func (*SyncKubeConfigToWorker) Execute

func (s *SyncKubeConfigToWorker) Execute(runtime connector.Runtime) error

type SyncKubelet

type SyncKubelet struct {
	common.KubeAction
}

func (*SyncKubelet) Execute

func (s *SyncKubelet) Execute(runtime connector.Runtime) error

type UpgradeKubeMaster

type UpgradeKubeMaster struct {
	common.KubeAction
	ModuleName string
}

func (*UpgradeKubeMaster) Execute

func (u *UpgradeKubeMaster) Execute(runtime connector.Runtime) error

type UpgradeKubeWorker

type UpgradeKubeWorker struct {
	common.KubeAction
	ModuleName string
}

func (*UpgradeKubeWorker) Execute

func (u *UpgradeKubeWorker) Execute(runtime connector.Runtime) error

type UpgradeStep

type UpgradeStep int
const (
	ToV121 UpgradeStep = iota + 1
	ToV122
)

func (UpgradeStep) String

func (u UpgradeStep) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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