hosts

package
v0.1.3-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToCleanEtcdDir       = "/var/lib/etcd"
	ToCleanSSLDir        = "/etc/kubernetes/ssl"
	ToCleanCNIConf       = "/etc/cni"
	ToCleanCNIBin        = "/opt/cni"
	ToCleanCNILib        = "/var/lib/cni"
	ToCleanCalicoRun     = "/var/run/calico"
	ToCleanTempCertPath  = "/etc/kubernetes/.tmp/"
	CleanerContainerName = "kube-cleaner"
)
View Source
const (
	DockerAPIVersion = "1.24"
	K8sVersion       = "1.8"
)

Variables

This section is empty.

Functions

func DeleteNode

func DeleteNode(ctx context.Context, toDeleteHost *Host, kubeClient *kubernetes.Clientset, hasAnotherRole bool) error

func IsHostListChanged

func IsHostListChanged(currentHosts, configHosts []*Host) bool

func LocalConnFactory

func LocalConnFactory(h *Host) (func(network, address string) (net.Conn, error), error)

func LocalHealthcheckFactory

func LocalHealthcheckFactory(h *Host) (func(network, address string) (net.Conn, error), error)

func RemoveTaintFromHost

func RemoveTaintFromHost(ctx context.Context, host *Host, taintKey string, kubeClient *kubernetes.Clientset) error

func SSHFactory

func SSHFactory(h *Host) (func(network, address string) (net.Conn, error), error)

Types

type DialerFactory

type DialerFactory func(h *Host) (func(network, address string) (net.Conn, error), error)

type Host

type Host struct {
	v3.RKEConfigNode
	DClient             *client.Client
	LocalConnPort       int
	IsControl           bool
	IsWorker            bool
	IsEtcd              bool
	IgnoreDockerVersion bool
	ToAddEtcdMember     bool
	ExistingEtcdCluster bool
	SavedKeyPhrase      string
	ToAddLabels         map[string]string
	ToDelLabels         map[string]string
	ToAddTaints         []string
	ToDelTaints         []string
	DockerInfo          types.Info
	UpdateWorker        bool
}

func GetToAddHosts

func GetToAddHosts(currentHosts, configHosts []*Host) []*Host

func GetToDeleteHosts

func GetToDeleteHosts(currentHosts, configHosts, inactiveHosts []*Host) []*Host

func GetUniqueHostList added in v0.1.2

func GetUniqueHostList(etcdHosts, cpHosts, workerHosts []*Host) []*Host

func NodesToHosts added in v0.1.2

func NodesToHosts(rkeNodes []v3.RKEConfigNode, nodeRole string) []*Host

func (*Host) CleanUp

func (h *Host) CleanUp(ctx context.Context, toCleanPaths []string, cleanerImage string, prsMap map[string]v3.PrivateRegistry) error

func (*Host) CleanUpAll

func (h *Host) CleanUpAll(ctx context.Context, cleanerImage string, prsMap map[string]v3.PrivateRegistry, externalEtcd bool) error

func (*Host) CleanUpControlHost

func (h *Host) CleanUpControlHost(ctx context.Context, cleanerImage string, prsMap map[string]v3.PrivateRegistry) error

func (*Host) CleanUpEtcdHost

func (h *Host) CleanUpEtcdHost(ctx context.Context, cleanerImage string, prsMap map[string]v3.PrivateRegistry) error

func (*Host) CleanUpWorkerHost

func (h *Host) CleanUpWorkerHost(ctx context.Context, cleanerImage string, prsMap map[string]v3.PrivateRegistry) error

func (*Host) TunnelUp

func (h *Host) TunnelUp(ctx context.Context, dialerFactory DialerFactory) error

func (*Host) TunnelUpLocal

func (h *Host) TunnelUpLocal(ctx context.Context) error

Jump to

Keyboard shortcuts

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