op

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EtcdEndpointsName is the resource name for CKE-managed etcd
	EtcdEndpointsName = "cke-etcd"
	// EtcdServiceName is the resource name for CKE-managed etcd
	EtcdServiceName = EtcdEndpointsName
)
View Source
const (
	// EtcdContainerName is container name of etcd
	EtcdContainerName = "etcd"
	// KubeAPIServerContainerName is name of kube-apiserver
	KubeAPIServerContainerName = "kube-apiserver"
	// KubeControllerManagerContainerName is name of kube-controller-manager
	KubeControllerManagerContainerName = "kube-controller-manager"
	// KubeProxyContainerName is container name of kube-proxy
	KubeProxyContainerName = "kube-proxy"
	// KubeSchedulerContainerName is container name of kube-scheduler
	KubeSchedulerContainerName = "kube-scheduler"
	// KubeletContainerName is container name of kubelet
	KubeletContainerName = "kubelet"
	// RiversContainerName is container name of rivers
	RiversContainerName = "rivers"
	// EtcdRiversContainerName is container name of etcd-rivers
	EtcdRiversContainerName = "etcd-rivers"

	// RiversUpstreamPort is upstream port of rivers container
	RiversUpstreamPort = 6443
	// RiversListenPort is listen port of rivers container
	RiversListenPort = 16443
	// EtcdRiversUpstreamPort is upstream port of etcd-rivers container
	EtcdRiversUpstreamPort = 2379
	// EtcdRiversListenPort is listen port of etcd-rivers container
	EtcdRiversListenPort = 12379

	// ClusterDNSAppName is app name of cluster DNS
	ClusterDNSAppName = "cluster-dns"
	// NodeDNSAppName is app name of node-dns
	NodeDNSAppName = "node-dns"

	// DefaultEtcdVolumeName is etcd default volume name
	DefaultEtcdVolumeName = "etcd-cke"
	// EtcdAddedMemberVolumeName is volume name for flag of add-etcd-member has completed or not
	EtcdAddedMemberVolumeName = "etcd-added-member"

	// TimeoutDuration is default timeout duration
	TimeoutDuration = 5 * time.Second

	// CKELabelMaster is the label name added to control plane nodes
	CKELabelMaster = "cke.cybozu.com/master"
	// CKETaintMaster is the taint name added to control plane nodes
	CKETaintMaster = "cke.cybozu.com/master"

	// CKELabelAppName is application name
	CKELabelAppName = "cke.cybozu.com/appname"
	// EtcdBackupAppName is application name for etcdbackup
	EtcdBackupAppName = "etcdbackup"

	// PolicyConfigPath is a path for scheduler extender policy
	PolicyConfigPath = "/etc/kubernetes/scheduler/policy.cfg"
	// SchedulerConfigPath is a path for scheduler extender config
	SchedulerConfigPath = "/etc/kubernetes/scheduler/config.yml"
	// SchedulerKubeConfigPath is a path for scheduler kubeconfig
	SchedulerKubeConfigPath = "/etc/kubernetes/scheduler/kubeconfig"
)

Variables

This section is empty.

Functions

func APIServerStopOp

func APIServerStopOp(nodes []*cke.Node) cke.Operator

APIServerStopOp returns an Operator to stop API server

func CheckKubeletHealthz added in v1.15.0

func CheckKubeletHealthz(ctx context.Context, inf cke.Infrastructure, addr string, port uint16) (bool, error)

CheckKubeletHealthz checks that Kubelet is healthy

func ControllerManagerStopOp

func ControllerManagerStopOp(nodes []*cke.Node) cke.Operator

ControllerManagerStopOp returns an Operator to stop kube-controller-manager

func EtcdPKIPath

func EtcdPKIPath(p string) string

EtcdPKIPath returns a certificate file path for k8s.

func EtcdRiversStopOp added in v1.14.1

func EtcdRiversStopOp(nodes []*cke.Node) cke.Operator

EtcdRiversStopOp returns an Operator to stop etcd-rivers

func EtcdStopOp

func EtcdStopOp(nodes []*cke.Node) cke.Operator

EtcdStopOp returns an Operator to stop etcd

func EtcdVolumeName

func EtcdVolumeName(e cke.EtcdParams) string

EtcdVolumeName returns etcd volume name

func GetEtcdClusterStatus

func GetEtcdClusterStatus(ctx context.Context, inf cke.Infrastructure, nodes []*cke.Node) (cke.EtcdClusterStatus, error)

GetEtcdClusterStatus returns EtcdClusterStatus

func GetKubernetesClusterStatus

func GetKubernetesClusterStatus(ctx context.Context, inf cke.Infrastructure, n *cke.Node, cluster *cke.Cluster) (cke.KubernetesClusterStatus, error)

GetKubernetesClusterStatus returns KubernetesClusterStatus

func GetNodeStatus

func GetNodeStatus(ctx context.Context, inf cke.Infrastructure, node *cke.Node, cluster *cke.Cluster) (*cke.NodeStatus, error)

GetNodeStatus returns NodeStatus.

func GuessMemberName added in v1.14.1

func GuessMemberName(m *etcdserverpb.Member) (string, error)

GuessMemberName returns etcd member's ip address

func K8sPKIPath

func K8sPKIPath(p string) string

K8sPKIPath returns a certificate file path for k8s.

func KubeEndpointsCreateOp added in v1.14.13

func KubeEndpointsCreateOp(apiserver *cke.Node, ep *corev1.Endpoints) cke.Operator

KubeEndpointsCreateOp returns an Operator to create Endpoints resource.

func KubeEndpointsUpdateOp added in v1.14.13

func KubeEndpointsUpdateOp(apiserver *cke.Node, ep *corev1.Endpoints) cke.Operator

KubeEndpointsUpdateOp returns an Operator to update Endpoints resource.

func KubeEtcdServiceCreateOp added in v1.14.13

func KubeEtcdServiceCreateOp(apiserver *cke.Node) cke.Operator

KubeEtcdServiceCreateOp returns an Operator to create Service resource for etcd.

func KubeEtcdServiceUpdateOp added in v1.14.13

func KubeEtcdServiceUpdateOp(apiserver *cke.Node) cke.Operator

KubeEtcdServiceUpdateOp returns an Operator to update Service resource for etcd.

func KubeNodeRemoveOp

func KubeNodeRemoveOp(apiserver *cke.Node, nodes []*corev1.Node) cke.Operator

KubeNodeRemoveOp removes k8s Node resources.

func KubeNodeUpdateOp

func KubeNodeUpdateOp(apiserver *cke.Node, nodes []*corev1.Node) cke.Operator

KubeNodeUpdateOp updates k8s Node resources.

func KubeWaitOp

func KubeWaitOp(apiserver *cke.Node) cke.Operator

KubeWaitOp returns an Operator to wait for Kubernetes resources gets initialized

func ResourceApplyOp added in v1.13.9

func ResourceApplyOp(apiServer *cke.Node, resource cke.ResourceDefinition, forceConflicts bool) cke.Operator

ResourceApplyOp creates or updates a Kubernetes object.

func RiversBootOp added in v1.14.1

func RiversBootOp(nodes, upstreams []*cke.Node, params cke.ServiceParams, name string, upstreamPort, listenPort int) cke.Operator

RiversBootOp returns an Operator to bootstrap rivers.

func RiversParams added in v1.14.1

func RiversParams(upstreams []*cke.Node, upstreamPort, listenPort int) cke.ServiceParams

RiversParams returns parameters for rivers.

func RiversRestartOp added in v1.14.1

func RiversRestartOp(nodes, upstreams []*cke.Node, params cke.ServiceParams, name string, upstreamPort, listenPort int) cke.Operator

RiversRestartOp returns an Operator to restart rivers.

func SchedulerStopOp

func SchedulerStopOp(nodes []*cke.Node) cke.Operator

SchedulerStopOp returns an Operator to stop kube-scheduler

func UpgradeOp added in v1.15.7

func UpgradeOp(current string, nodes []*cke.Node) cke.Operator

UpgradeOp returns an Operator to upgrade cluster configuration.

func UpgradeToVersion2Command added in v1.15.7

func UpgradeToVersion2Command(nodes []*cke.Node) cke.Commander

UpgradeToVersion2Command returns a Commander to upgrade from version 1 to 2.

Types

This section is empty.

Directories

Path Synopsis
Package common provides generic commands shared by many Operators.
Package common provides generic commands shared by many Operators.

Jump to

Keyboard shortcuts

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