Documentation ¶
Index ¶
- Constants
- type Argument
- type ArtifactAction
- type ArtifactArgument
- type ArtifactManifest
- type ArtifactModule
- type ArtifactPrepare
- type ArtifactRuntime
- type AtLeastV124
- type ConfigMapLoader
- type DefaultLoader
- type EnableAudit
- type EnableKubeProxy
- type FileLoader
- type IsMaster
- type IsWorker
- type KubeAction
- type KubeConf
- type KubeCustomModule
- type KubeModule
- type KubePrepare
- type KubeRollback
- type KubeRuntime
- type Loader
- type LocalRuntime
- type OnlyETCD
- type OnlyFirstMaster
- type OnlyK3s
- type OnlyKubernetes
- type OnlyWorker
- type Options
Constants ¶
View Source
const ( K3s = "k3s" K8e = "k8e" Kubernetes = "kubernetes" LocalHost = "localhost" AllInOne = "allInOne" File = "file" Operator = "operator" Master = "master" Worker = "worker" ETCD = "etcd" K8s = "k8s" Registry = "registry" KubeKey = "kubekey" Harbor = "harbor" DockerCompose = "compose" KubeBinaries = "KubeBinaries" TmpDir = "/tmp/kubekey" BinDir = "/usr/local/bin" KubeConfigDir = "/etc/kubernetes" KubeAddonsDir = "/etc/kubernetes/addons" KubeCertDir = "/etc/kubernetes/pki" KubeManifestDir = "/etc/kubernetes/manifests" KubeScriptDir = "/usr/local/bin/kube-scripts" KubeletFlexvolumesPluginsDir = "/usr/libexec/kubernetes/kubelet-plugins/volume/exec" ETCDCertDir = "/etc/ssl/etcd/ssl" RegistryCertDir = "/etc/ssl/registry/ssl" HaproxyDir = "/etc/kubekey/haproxy" IPv4Regexp = "[\\d]+\\.[\\d]+\\.[\\d]+\\.[\\d]+" IPv6Regexp = "[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){0,7}::[a-f0-9]{0,4}(:[a-f0-9]{1,4}){0,7}" Calico = "calico" Flannel = "flannel" Cilium = "cilium" Kubeovn = "kubeovn" Hybridnet = "hybridnet" Docker = "docker" CriDockerd = "cri-dockerd" Crictl = "crictl" Containerd = "containerd" Crio = "crio" Isula = "isula" Runc = "runc" Buildx = "buildx" // global cache key // PreCheckModule NodePreCheck = "nodePreCheck" K8sVersion = "k8sVersion" // current k8s version MaxK8sVersion = "maxK8sVersion" // max k8s version of nodes KubeSphereVersion = "kubeSphereVersion" // current KubeSphere version ClusterNodeStatus = "clusterNodeStatus" ClusterNodeCRIRuntimes = "ClusterNodeCRIRuntimes" ClusterFeatureGates = "ClusterFeatureGates" DesiredK8sVersion = "desiredK8sVersion" PlanK8sVersion = "planK8sVersion" NodeK8sVersion = "NodeK8sVersion" // ETCDModule ETCDCluster = "etcdCluster" ETCDName = "etcdName" ETCDExist = "etcdExist" // KubernetesModule ClusterStatus = "clusterStatus" ClusterExist = "clusterExist" // CertsModule Certificate = "certificate" CaCertificate = "caCertificate" // Artifact pipeline Artifact = "artifact" // Image Copy Transports DockerDaemon = "docker-daemon" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Argument ¶
type Argument struct { NodeName string FilePath string KubernetesVersion string KsEnable bool KsVersion string Debug bool IgnoreErr bool SkipInstallAddons bool EnabledAddons []string SkipPullImages bool SkipPushImages bool SkipDependencyCheck bool SecurityEnhancement bool DeployLocalStorage *bool DownloadCommand func(path, url string) string SkipConfirmCheck bool ContainerManager string FromCluster bool KubeConfig string Artifact string ImageTransport string InstallPackages bool ImagesDir string Namespace string DeleteCRI bool Role string Type string EtcdUpgrade bool WithBuildx bool }
type ArtifactAction ¶
type ArtifactAction struct { action.BaseAction Manifest *ArtifactManifest }
func (*ArtifactAction) AutoAssert ¶
func (a *ArtifactAction) AutoAssert(runtime connector.Runtime)
type ArtifactArgument ¶
type ArtifactManifest ¶
type ArtifactManifest struct { Spec *kubekeyv1alpha2.ManifestSpec Arg ArtifactArgument }
type ArtifactModule ¶
type ArtifactModule struct { module.BaseTaskModule Manifest *ArtifactManifest }
func (*ArtifactModule) AutoAssert ¶
func (a *ArtifactModule) AutoAssert()
func (*ArtifactModule) IsSkip ¶
func (a *ArtifactModule) IsSkip() bool
type ArtifactPrepare ¶
type ArtifactPrepare struct { prepare.BasePrepare Manifest *ArtifactManifest }
func (*ArtifactPrepare) AutoAssert ¶
func (a *ArtifactPrepare) AutoAssert(runtime connector.Runtime)
type ArtifactRuntime ¶
type ArtifactRuntime struct { LocalRuntime Spec *kubekeyv1alpha2.ManifestSpec Arg ArtifactArgument }
func NewArtifactRuntime ¶
func NewArtifactRuntime(arg ArtifactArgument) (*ArtifactRuntime, error)
func (*ArtifactRuntime) Copy ¶
func (a *ArtifactRuntime) Copy() connector.Runtime
Copy is used to create a copy for Runtime.
type AtLeastV124 ¶ added in v3.1.0
type AtLeastV124 struct {
KubePrepare
}
type ConfigMapLoader ¶
type ConfigMapLoader struct { }
func (ConfigMapLoader) Load ¶
func (c ConfigMapLoader) Load() (*kubekeyapiv1alpha2.Cluster, error)
type DefaultLoader ¶
type DefaultLoader struct { KubernetesVersion string KubeSphereVersion string KubeSphereEnable bool // contains filtered or unexported fields }
func NewDefaultLoader ¶
func NewDefaultLoader(arg Argument) *DefaultLoader
func (*DefaultLoader) Load ¶
func (d *DefaultLoader) Load() (*kubekeyapiv1alpha2.Cluster, error)
type EnableAudit ¶ added in v3.0.8
type EnableAudit struct {
KubePrepare
}
type EnableKubeProxy ¶
type EnableKubeProxy struct {
KubePrepare
}
type FileLoader ¶
type FileLoader struct { FilePath string KubernetesVersion string KubeSphereVersion string KubeSphereEnable bool // contains filtered or unexported fields }
func NewFileLoader ¶
func NewFileLoader(arg Argument) *FileLoader
func (FileLoader) Load ¶
func (f FileLoader) Load() (*kubekeyapiv1alpha2.Cluster, error)
type IsMaster ¶
type IsMaster struct {
KubePrepare
}
type IsWorker ¶
type IsWorker struct { KubePrepare Not bool }
type KubeAction ¶
type KubeAction struct { action.BaseAction KubeConf *KubeConf }
func (*KubeAction) AutoAssert ¶
func (k *KubeAction) AutoAssert(runtime connector.Runtime)
type KubeConf ¶
type KubeConf struct { ClusterHosts []string ClusterName string Cluster *kubekeyapiv1alpha2.ClusterSpec Kubeconfig string Arg Argument }
type KubeCustomModule ¶
type KubeCustomModule struct { module.CustomModule KubeConf *KubeConf }
func (*KubeCustomModule) AutoAssert ¶
func (k *KubeCustomModule) AutoAssert()
type KubeModule ¶
type KubeModule struct { module.BaseTaskModule KubeConf *KubeConf }
func (*KubeModule) AutoAssert ¶
func (k *KubeModule) AutoAssert()
func (*KubeModule) IsSkip ¶
func (k *KubeModule) IsSkip() bool
type KubePrepare ¶
type KubePrepare struct { prepare.BasePrepare KubeConf *KubeConf }
func (*KubePrepare) AutoAssert ¶
func (k *KubePrepare) AutoAssert(runtime connector.Runtime)
type KubeRollback ¶
type KubeRollback struct { rollback.BaseRollback KubeConf *KubeConf }
func (*KubeRollback) AutoAssert ¶
func (k *KubeRollback) AutoAssert(runtime connector.Runtime)
type KubeRuntime ¶
type KubeRuntime struct { connector.BaseRuntime ClusterName string Cluster *kubekeyapiv1alpha2.ClusterSpec Kubeconfig string Arg Argument }
func NewKubeRuntime ¶
func NewKubeRuntime(flag string, arg Argument) (*KubeRuntime, error)
func (*KubeRuntime) Copy ¶
func (k *KubeRuntime) Copy() connector.Runtime
Copy is used to create a copy for Runtime.
type Loader ¶
type Loader interface {
Load() (*kubekeyapiv1alpha2.Cluster, error)
}
type LocalRuntime ¶
type LocalRuntime struct {
connector.BaseRuntime
}
func NewLocalRuntime ¶
func NewLocalRuntime(debug, ingoreErr bool) (LocalRuntime, error)
type OnlyETCD ¶
type OnlyETCD struct { KubePrepare Not bool }
type OnlyFirstMaster ¶
type OnlyFirstMaster struct { KubePrepare Not bool }
type OnlyK3s ¶
type OnlyK3s struct {
KubePrepare
}
type OnlyKubernetes ¶
type OnlyKubernetes struct {
KubePrepare
}
type OnlyWorker ¶
type OnlyWorker struct {
KubePrepare
}
Click to show internal directories.
Click to hide internal directories.