Documentation ¶
Index ¶
- Constants
- func CertificatePath(sshCertPath string) (string, error)
- func CleanHeritageContainers(ctx context.Context, h *Host) error
- func CleanHeritageStorge(ctx context.Context, h *Host, removeImage, clusterCIDR string, ...) error
- func DeleteNode(ctx context.Context, toDeleteHost *Host, kubeClient *kubernetes.Clientset, ...) error
- func DoRunLogCleaner(ctx context.Context, host *Host, alpineImage string, ...) error
- func GetSSHConfig(username, sshPrivateKeyString string) (*ssh.ClientConfig, error)
- func IsHostListChanged(currentHosts, configHosts []*Host) bool
- func IsNodeInList(host *Host, hostList []*Host) bool
- func LocalConnFactory(h *Host) (func(network, address string) (net.Conn, error), error)
- func NewDialer(h *Host, kind string) (*dialer, error)
- func PrivateKeyPath(sshKeyPath string) (string, error)
- func RemoveTaintFromHost(ctx context.Context, host *Host, taintKey string, ...) error
- func SSHFactory(h *Host) (func(network, address string) (net.Conn, error), error)
- type DialerFactory
- type DialersOptions
- type Host
- func (h *Host) CleanUp(ctx context.Context, toCleanPaths []string, cleanerImage string, ...) error
- func (h *Host) CleanUpAll(ctx context.Context, cleanerImage string, storageCleanerImage string, ...) error
- func (h *Host) CleanUpControlHost(ctx context.Context, cleanerImage string, storageCleanerImage string, ...) error
- func (h *Host) CleanUpEtcdHost(ctx context.Context, cleanerImage string, storageCleanerImage string, ...) error
- func (h *Host) CleanUpWorkerHost(ctx context.Context, cleanerImage string, storageCleanerImage string, ...) error
- func (h *Host) GetSSHClient() (*ssh.Client, error)
- func (h *Host) GetSSHCmdOutput(cli *ssh.Client, cmd string) (string, string, error)
- func (h *Host) GetSftpClient(cli *ssh.Client) (*sftp.Client, error)
- func (h *Host) TransFile(cli *sftp.Client, srcFilePath string, dstPath string) error
- func (h *Host) TunnelUp(ctx context.Context, dialerFactory DialerFactory, clusterPrefixPath string, ...) error
Constants ¶
View Source
const ( ToCleanEtcdDir = "/var/lib/etcd/" ToCleanKubeletDir = "/var/lib/kubelet" ToCleanRookDir = "/var/lib/rook" ToCleanZcloudDir = "/var/lib/zcloud" ToCleanFlannelDir = "/var/run/flannel/" ToCleanSSLDir = "/etc/kubernetes/" ToCleanCNIConf = "/etc/cni/" ToCleanCNIBin = "/opt/cni/" ToCleanCNILib = "/var/lib/cni/" ToCleanCalicoRun = "/var/run/calico/" ToCleanDockerCerts = "/etc/docker/certs.d" ToCleanZKE = "/opt/zke" ToCleanTempCertPath = "/etc/kubernetes/.tmp/" CleanerContainerName = "kube-cleaner" LogCleanerContainerName = "zke-log-cleaner" ZKELogsPath = "/var/lib/zcloud/zke/log" )
View Source
const (
DockerAPIVersion = "1.24"
)
View Source
const (
DockerDialerTimeout = 120
)
View Source
const ZKERemoverEnvName = "PodCIDR"
Variables ¶
This section is empty.
Functions ¶
func CertificatePath ¶
func CleanHeritageStorge ¶
func DeleteNode ¶
func DoRunLogCleaner ¶
func GetSSHConfig ¶
func GetSSHConfig(username, sshPrivateKeyString string) (*ssh.ClientConfig, error)
func IsHostListChanged ¶
func IsNodeInList ¶
func LocalConnFactory ¶
func PrivateKeyPath ¶
func RemoveTaintFromHost ¶
Types ¶
type DialerFactory ¶
type DialersOptions ¶
type DialersOptions struct { DockerDialerFactory DialerFactory K8sWrapTransport k8s.WrapTransport }
func GetDialerOptions ¶
func GetDialerOptions(d DialerFactory, w k8s.WrapTransport) DialersOptions
type Host ¶
type Host struct { types.ZKEConfigNode DClient *client.Client LocalConnPort int IsControl bool IsWorker bool IsEtcd bool IsStorage bool IsEdge bool IgnoreDockerVersion bool ToAddEtcdMember bool ExistingEtcdCluster bool SavedKeyPhrase string ToAddLabels map[string]string ToDelLabels map[string]string ToAddTaints []string ToDelTaints []string DockerInfo dockertypes.Info UpdateWorker bool PrefixPath string }
func GetToAddHosts ¶
func GetToDeleteHosts ¶
func GetUniqueHostList ¶
func NodesToHosts ¶
func NodesToHosts(zkeNodes []types.ZKEConfigNode, nodeRole string) []*Host
func (*Host) CleanUpAll ¶
func (*Host) CleanUpControlHost ¶
func (*Host) CleanUpEtcdHost ¶
func (*Host) CleanUpWorkerHost ¶
func (*Host) GetSSHCmdOutput ¶
Click to show internal directories.
Click to hide internal directories.