kubernetes

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmpDownloadDir = "/tmp"
	// TokenUser defines token user
	TokenUser = "tls-bootstrap-token-user"
)

Variables

View Source
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

func CheckAndInstallKubeadm(kubernetesResourceServer, clusterVersion string) error

CheckAndInstallKubeadm install kubeadm, skip install if it exist.

func CheckAndInstallKubelet

func CheckAndInstallKubelet(kubernetesResourceServer, clusterVersion string) error

CheckAndInstallKubelet install kubelet and kubernetes-cni, skip install if they exist.

func CheckAndInstallKubernetesCni added in v1.2.0

func CheckAndInstallKubernetesCni(reuseCNIBin bool) error

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.

Jump to

Keyboard shortcuts

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