hosts

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToCleanEtcdDir          = "/var/lib/etcd/"
	ToCleanSSLDir           = "/etc/kubernetes/"
	ToCleanCNIConf          = "/etc/cni/"
	ToCleanCNIBin           = "/opt/cni/"
	ToCleanCNILib           = "/var/lib/cni/"
	ToCleanCalicoRun        = "/var/run/calico/"
	ToCleanTempCertPath     = "/etc/kubernetes/.tmp/"
	CleanerContainerName    = "kube-cleaner"
	LogCleanerContainerName = "rke-log-cleaner"
	RKELogsPath             = "/var/lib/rancher/rke/log"

	B2DOS            = "Boot2Docker"
	B2DPrefixPath    = "/mnt/sda1/rke"
	ROS              = "RancherOS"
	ROSPrefixPath    = "/opt/rke"
	CoreOS           = "CoreOS"
	CoreOSPrefixPath = "/opt/rke"
)
View Source
const (
	DINDPort = "2375"
)
View Source
const (
	DockerAPIVersion = "1.24"
)
View Source
const (
	DockerDialerTimeout = 50
)

Variables

This section is empty.

Functions

func BastionHostWrapTransport added in v0.1.7

func BastionHostWrapTransport(bastionHost v3.BastionHost) (k8s.WrapTransport, error)

func DeleteNode

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

func DindConnFactory added in v0.1.9

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

func DindHealthcheckConnFactory added in v0.1.9

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

func DoRunLogCleaner added in v0.1.8

func DoRunLogCleaner(ctx context.Context, host *Host, alpineImage string, prsMap map[string]v3.PrivateRegistry) error

func GetPrefixPath added in v0.1.8

func GetPrefixPath(osType, ClusterPrefixPath string) string

func IsHostListChanged

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

func IsNodeInList added in v0.1.10

func IsNodeInList(host *Host, hostList []*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 DialersOptions added in v0.2.0

type DialersOptions struct {
	DockerDialerFactory    DialerFactory
	LocalConnDialerFactory DialerFactory
	K8sWrapTransport       k8s.WrapTransport
}

func GetDialerOptions added in v0.2.0

func GetDialerOptions(d, l DialerFactory, w k8s.WrapTransport) DialersOptions

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
	PrefixPath          string
	BastionHost         v3.BastionHost
}

func GetHostListIntersect added in v0.2.0

func GetHostListIntersect(a []*Host, b []*Host) []*Host

func GetToAddHosts

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

func GetToDeleteHosts

func GetToDeleteHosts(currentHosts, configHosts, inactiveHosts []*Host, includeInactive bool) []*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, clusterPrefixPath string, clusterVersion string) error

func (*Host) TunnelUpLocal

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

Jump to

Keyboard shortcuts

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