Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAndInstallKubeadm(kubernetesResourceServer, clusterVersion string) error
- func CheckAndInstallKubelet(kubernetesResourceServer, clusterVersion string) error
- func CheckAndInstallKubernetesCni(reuseCNIBin bool) error
- func CheckKubeletStatus() error
- func GetKubernetesVersionFromCluster(client kubernetes.Interface) (string, error)
- func GetYurthubTemplateFromStaticPod(client kubernetes.Interface, namespace, name string) (string, string, error)
- func RetrieveBootstrapConfig(data joindata.YurtJoinData) (*clientcmdapi.Config, error)
- func RunJobAndCleanup(cliSet *kubernetes.Clientset, job *batchv1.Job, timeout, period time.Duration, ...) error
- func SetDiscoveryConfig(data joindata.YurtJoinData) error
- func SetKubeadmJoinConfig(data joindata.YurtJoinData) error
- func SetKubeletConfigForNode() error
- func SetKubeletService() error
- func SetKubeletUnitConfig() error
Constants ¶
const ( TmpDownloadDir = "/tmp" // TokenUser defines token user TokenUser = "tls-bootstrap-token-user" )
Variables ¶
var ( // PropagationPolicy defines the propagation policy used when deleting a resource PropagationPolicy = metav1.DeletePropagationBackground ErrClusterVersionEmpty = errors.New("cluster version should not be empty") )
Functions ¶
func CheckAndInstallKubeadm ¶ added in v1.2.0
CheckAndInstallKubeadm install kubeadm, skip install if it exist.
func CheckAndInstallKubelet ¶
CheckAndInstallKubelet install kubelet and kubernetes-cni, skip install if they exist.
func CheckAndInstallKubernetesCni ¶ added in v1.2.0
CheckAndInstallKubernetesCni install kubernetes-cni, skip install if they exist.
func CheckKubeletStatus ¶ added in v1.3.0
func CheckKubeletStatus() error
CheckKubeletStatus check if kubelet is healthy.
func GetKubernetesVersionFromCluster ¶
func GetKubernetesVersionFromCluster(client kubernetes.Interface) (string, error)
GetKubernetesVersionFromCluster get kubernetes cluster version from master.
func GetYurthubTemplateFromStaticPod ¶ added in v1.3.0
func GetYurthubTemplateFromStaticPod(client kubernetes.Interface, namespace, name string) (string, string, error)
GetYurthubTemplateFromStaticPod get yurthub template from static pod
func RetrieveBootstrapConfig ¶ added in v1.2.0
func RetrieveBootstrapConfig(data joindata.YurtJoinData) (*clientcmdapi.Config, error)
RetrieveBootstrapConfig get clientcmdapi config by bootstrap token
func RunJobAndCleanup ¶
func RunJobAndCleanup(cliSet *kubernetes.Clientset, job *batchv1.Job, timeout, period time.Duration, waitForTimeout bool) error
RunJobAndCleanup runs the job, wait for it to be complete, and delete it
func SetDiscoveryConfig ¶ added in v1.2.0
func SetDiscoveryConfig(data joindata.YurtJoinData) error
func SetKubeadmJoinConfig ¶ added in v1.2.0
func SetKubeadmJoinConfig(data joindata.YurtJoinData) error
func SetKubeletConfigForNode ¶
func SetKubeletConfigForNode() error
SetKubeletConfigForNode write kubelet.conf for join node.
func SetKubeletService ¶
func SetKubeletService() error
SetKubeletService configure kubelet service.
func SetKubeletUnitConfig ¶
func SetKubeletUnitConfig() error
SetKubeletUnitConfig configure kubelet startup parameters.
Types ¶
This section is empty.