services

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EtcdSnapshotPath = "/opt/rke/etcd-snapshots"
	EtcdRestorePath  = "/opt/rke/etcd-snapshots-restore/"
	EtcdDataDir      = "/var/lib/rancher/etcd/"
)
View Source
const (
	HealthzAddress   = "localhost"
	HealthzEndpoint  = "/healthz"
	HTTPProtoPrefix  = "http://"
	HTTPSProtoPrefix = "https://"
)
View Source
const (
	NginxProxyImage   = "rancher/rke-nginx-proxy:0.1.0"
	NginxProxyEnvName = "CP_HOSTS"
)
View Source
const (
	ETCDRole    = "etcd"
	ControlRole = "controlplane"
	WorkerRole  = "worker"

	SidekickServiceName   = "sidekick"
	RBACAuthorizationMode = "rbac"

	KubeAPIContainerName          = "kube-apiserver"
	KubeletContainerName          = "kubelet"
	KubeproxyContainerName        = "kube-proxy"
	KubeControllerContainerName   = "kube-controller-manager"
	SchedulerContainerName        = "kube-scheduler"
	EtcdContainerName             = "etcd"
	EtcdSnapshotContainerName     = "etcd-rolling-snapshots"
	EtcdSnapshotOnceContainerName = "etcd-snapshot-once"
	EtcdRestoreContainerName      = "etcd-restore"
	NginxProxyContainerName       = "nginx-proxy"
	SidekickContainerName         = "service-sidekick"
	LogLinkContainerName          = "rke-log-linker"
	LogCleanerContainerName       = "rke-log-cleaner"

	KubeAPIPort        = 6443
	SchedulerPort      = 10251
	KubeControllerPort = 10252
	KubeletPort        = 10250
	KubeproxyPort      = 10256
)

Variables

This section is empty.

Functions

func AddEtcdMember

func AddEtcdMember(ctx context.Context, toAddEtcdHost *hosts.Host, etcdHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, cert, key []byte) error

func GetEtcdConnString

func GetEtcdConnString(hosts []*hosts.Host) string

func GetEtcdInitialCluster added in v0.1.2

func GetEtcdInitialCluster(hosts []*hosts.Host) string

func GetHealthCheckURL added in v0.1.2

func GetHealthCheckURL(useTLS bool, port int) string

func GetProcessConfig added in v0.1.2

func GetProcessConfig(process v3.Process) (*container.Config, *container.HostConfig, string)

func IsEtcdMember added in v0.1.2

func IsEtcdMember(ctx context.Context, etcdHost *hosts.Host, etcdHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, cert, key []byte) (bool, error)

func ReloadEtcdCluster

func ReloadEtcdCluster(ctx context.Context, readyEtcdHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, cert, key []byte, prsMap map[string]v3.PrivateRegistry, etcdNodePlanMap map[string]v3.RKEConfigNodePlan, alpineImage string) error

func RemoveControlPlane

func RemoveControlPlane(ctx context.Context, controlHosts []*hosts.Host, force bool) error

func RemoveEtcdMember

func RemoveEtcdMember(ctx context.Context, etcdHost *hosts.Host, etcdHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, cert, key []byte) error

func RemoveEtcdPlane

func RemoveEtcdPlane(ctx context.Context, etcdHosts []*hosts.Host, force bool) error

func RemoveWorkerPlane

func RemoveWorkerPlane(ctx context.Context, workerHosts []*hosts.Host, force bool) error

func RestoreEtcdSnapshot added in v0.1.7

func RestoreEtcdSnapshot(ctx context.Context, etcdHost *hosts.Host, prsMap map[string]v3.PrivateRegistry, etcdRestoreImage, snapshotName, initCluster string) error

func RunControlPlane

func RunControlPlane(ctx context.Context, controlHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, prsMap map[string]v3.PrivateRegistry, cpNodePlanMap map[string]v3.RKEConfigNodePlan, updateWorkersOnly bool, alpineImage string, certMap map[string]pki.CertificatePKI) error

func RunEtcdPlane

func RunEtcdPlane(
	ctx context.Context,
	etcdHosts []*hosts.Host,
	etcdNodePlanMap map[string]v3.RKEConfigNodePlan,
	localConnDialerFactory hosts.DialerFactory,
	prsMap map[string]v3.PrivateRegistry,
	updateWorkersOnly bool,
	alpineImage string,
	etcdSnapshot EtcdSnapshot) error

func RunEtcdSnapshotSave added in v0.1.7

func RunEtcdSnapshotSave(ctx context.Context, etcdHost *hosts.Host, prsMap map[string]v3.PrivateRegistry, etcdSnapshotImage string, creation, retention, name string, once bool) error

func RunWorkerPlane

func RunWorkerPlane(ctx context.Context, allHosts []*hosts.Host, localConnDialerFactory hosts.DialerFactory, prsMap map[string]v3.PrivateRegistry, workerNodePlanMap map[string]v3.RKEConfigNodePlan, certMap map[string]pki.CertificatePKI, updateWorkersOnly bool, alpineImage string) error

Types

type EtcdSnapshot added in v0.1.7

type EtcdSnapshot struct {
	// Enable or disable snapshot creation
	Snapshot bool
	// Creation period of the etcd snapshots
	Creation string
	// Retention period of the etcd snapshots
	Retention string
}

Jump to

Keyboard shortcuts

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