Documentation ¶
Index ¶
- Constants
- Variables
- type CommandType
- type KubeadmRuntime
- func (k *KubeadmRuntime) Command(cmdType CommandType) (cmd string)
- func (k *KubeadmRuntime) CompleteKubeadmConfig(fns ...func(*KubeadmRuntime) error) error
- func (k *KubeadmRuntime) ConfigJoinMasterKubeadmToMaster(master string) error
- func (k *KubeadmRuntime) CopyStaticFilesToMasters() error
- func (k *KubeadmRuntime) CreateKubeConfigFiles() error
- func (k *KubeadmRuntime) GenerateCert() error
- func (k *KubeadmRuntime) GetRawConfig() ([]byte, error)
- func (k *KubeadmRuntime) Init() error
- func (k *KubeadmRuntime) InitCertsAndKubeConfigs() error
- func (k *KubeadmRuntime) InitKubeadmConfigToMaster0() error
- func (k *KubeadmRuntime) InitMaster0() error
- func (k *KubeadmRuntime) MergeKubeadmConfig() error
- func (k *KubeadmRuntime) Renew() error
- func (k *KubeadmRuntime) Reset() error
- func (k *KubeadmRuntime) ScaleDown(deleteMastersIPList []string, deleteNodesIPList []string) error
- func (k *KubeadmRuntime) ScaleUp(newMasterIPList []string, newNodeIPList []string) error
- func (k *KubeadmRuntime) SendJoinMasterKubeConfigs(masters []string, files ...string) error
- func (k *KubeadmRuntime) SyncNodeIPVS(mastersIPList, nodeIPList []string) error
- func (k *KubeadmRuntime) UpdateCertSANs(certSans []string) error
- func (k *KubeadmRuntime) Upgrade(version string) error
- func (k *KubeadmRuntime) Validate() error
- type StaticFile
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 (*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 ¶
StaticFile :static file should not be template, will never be changed while initialization.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.