Documentation ¶
Index ¶
- Constants
- func APIServerStopOp(nodes []*cke.Node) cke.Operator
- func CheckDrainCompletion(ctx context.Context, inf cke.Infrastructure, apiserver *cke.Node, ...) ([]*cke.RebootQueueEntry, []*cke.RebootQueueEntry, error)
- func CheckHealthz(ctx context.Context, inf cke.Infrastructure, addr string, port uint16) (bool, error)
- func CheckRebootDequeue(ctx context.Context, c *cke.Cluster, rqEntries []*cke.RebootQueueEntry) []*cke.RebootQueueEntry
- func ChooseDrainedNodes(c *cke.Cluster, apiServers map[string]bool, rqEntries []*cke.RebootQueueEntry) []*cke.RebootQueueEntry
- func ControllerManagerStopOp(nodes []*cke.Node) cke.Operator
- func EtcdPKIPath(p string) string
- func EtcdRiversStopOp(nodes []*cke.Node) cke.Operator
- func EtcdStopOp(nodes []*cke.Node) cke.Operator
- func EtcdVolumeName(e cke.EtcdParams) string
- func GetEtcdClusterStatus(ctx context.Context, inf cke.Infrastructure, nodes []*cke.Node) (cke.EtcdClusterStatus, error)
- func GetKubernetesClusterStatus(ctx context.Context, inf cke.Infrastructure, n *cke.Node, cluster *cke.Cluster) (cke.KubernetesClusterStatus, error)
- func GetNodeStatus(ctx context.Context, inf cke.Infrastructure, node *cke.Node, ...) (*cke.NodeStatus, error)
- func GuessMemberName(m *etcdserverpb.Member) (string, error)
- func K8sPKIPath(p string) string
- func KubeEndpointSliceCreateOp(apiserver *cke.Node, eps *discoveryv1.EndpointSlice) cke.Operator
- func KubeEndpointSliceUpdateOp(apiserver *cke.Node, eps *discoveryv1.EndpointSlice) cke.Operator
- func KubeEndpointsCreateOp(apiserver *cke.Node, ep *corev1.Endpoints) cke.Operator
- func KubeEndpointsUpdateOp(apiserver *cke.Node, ep *corev1.Endpoints) cke.Operator
- func KubeEtcdServiceCreateOp(apiserver *cke.Node) cke.Operator
- func KubeEtcdServiceUpdateOp(apiserver *cke.Node) cke.Operator
- func KubeNodeRemoveOp(apiserver *cke.Node, nodes []*corev1.Node) cke.Operator
- func KubeNodeUpdateOp(apiserver *cke.Node, nodes []*corev1.Node) cke.Operator
- func KubeWaitOp(apiserver *cke.Node) cke.Operator
- func ProxyStopOp(nodes []*cke.Node) cke.Operator
- func RebootDequeueOp(entries []*cke.RebootQueueEntry) cke.Operator
- func RebootDrainStartOp(apiserver *cke.Node, entries []*cke.RebootQueueEntry, config *cke.Reboot) cke.InfoOperator
- func RebootDrainTimeoutOp(entries []*cke.RebootQueueEntry) cke.Operator
- func RebootRebootOp(apiserver *cke.Node, entries []*cke.RebootQueueEntry, config *cke.Reboot) cke.InfoOperator
- func RebootUncordonOp(apiserver *cke.Node, nodeNames []string) cke.Operator
- func ResourceApplyOp(apiServer *cke.Node, resource cke.ResourceDefinition, forceConflicts bool) cke.Operator
- func RiversBootOp(nodes, upstreams []*cke.Node, params cke.ServiceParams, name string, ...) cke.Operator
- func RiversParams(upstreams []*cke.Node, upstreamPort, listenPort int) cke.ServiceParams
- func RiversRestartOp(nodes, upstreams []*cke.Node, params cke.ServiceParams, name string, ...) cke.Operator
- func SchedulerStopOp(nodes []*cke.Node) cke.Operator
- func UpgradeOp(current string, nodes []*cke.Node) cke.Operator
- func UpgradeToVersion2Command(nodes []*cke.Node) cke.Commander
Constants ¶
const ( // EtcdEndpointsName is the resource name for CKE-managed etcd EtcdEndpointsName = "cke-etcd" // EtcdEndpointSliceName is the resource name for CKE-managed etcd EtcdEndpointSliceName = EtcdEndpointsName // EtcdServiceName is the resource name for CKE-managed etcd EtcdServiceName = EtcdEndpointsName )
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" // CKEAnnotationReboot is the annotation to mark reboot targets CKEAnnotationReboot = "cke.cybozu.com/reboot" // 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" // ControllerManagerKubeConfigPath is a path for controller-manager kubeconfig ControllerManagerKubeConfigPath = "/etc/kubernetes/controller-manager/kubeconfig" )
Variables ¶
This section is empty.
Functions ¶
func APIServerStopOp ¶
APIServerStopOp returns an Operator to stop API server
func CheckDrainCompletion ¶ added in v1.22.8
func CheckDrainCompletion(ctx context.Context, inf cke.Infrastructure, apiserver *cke.Node, c *cke.Cluster, rqEntries []*cke.RebootQueueEntry) ([]*cke.RebootQueueEntry, []*cke.RebootQueueEntry, error)
func CheckHealthz ¶ added in v1.20.0
func CheckHealthz(ctx context.Context, inf cke.Infrastructure, addr string, port uint16) (bool, error)
CheckHealthz checks that Kubelet is healthy
func CheckRebootDequeue ¶ added in v1.22.8
func CheckRebootDequeue(ctx context.Context, c *cke.Cluster, rqEntries []*cke.RebootQueueEntry) []*cke.RebootQueueEntry
func ChooseDrainedNodes ¶ added in v1.22.8
func ChooseDrainedNodes(c *cke.Cluster, apiServers map[string]bool, rqEntries []*cke.RebootQueueEntry) []*cke.RebootQueueEntry
chooseDrainedNodes chooses nodes to be newly drained. For now, this function does not check "drainability".
func ControllerManagerStopOp ¶
ControllerManagerStopOp returns an Operator to stop kube-controller-manager
func EtcdPKIPath ¶
EtcdPKIPath returns a certificate file path for k8s.
func EtcdRiversStopOp ¶ added in v1.14.1
EtcdRiversStopOp returns an Operator to stop etcd-rivers
func EtcdStopOp ¶
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 ¶
K8sPKIPath returns a certificate file path for k8s.
func KubeEndpointSliceCreateOp ¶ added in v1.21.0
func KubeEndpointSliceCreateOp(apiserver *cke.Node, eps *discoveryv1.EndpointSlice) cke.Operator
KubeEndpointSliceCreateOp returns an Operator to create EndpointSlice resource.
func KubeEndpointSliceUpdateOp ¶ added in v1.21.0
func KubeEndpointSliceUpdateOp(apiserver *cke.Node, eps *discoveryv1.EndpointSlice) cke.Operator
KubeEndpointSliceUpdateOp returns an Operator to update Endpoints resource.
func KubeEndpointsCreateOp ¶ added in v1.14.13
KubeEndpointsCreateOp returns an Operator to create Endpoints resource.
func KubeEndpointsUpdateOp ¶ added in v1.14.13
KubeEndpointsUpdateOp returns an Operator to update Endpoints resource.
func KubeEtcdServiceCreateOp ¶ added in v1.14.13
KubeEtcdServiceCreateOp returns an Operator to create Service resource for etcd.
func KubeEtcdServiceUpdateOp ¶ added in v1.14.13
KubeEtcdServiceUpdateOp returns an Operator to update Service resource for etcd.
func KubeNodeRemoveOp ¶
KubeNodeRemoveOp removes k8s Node resources.
func KubeNodeUpdateOp ¶
KubeNodeUpdateOp updates k8s Node resources.
func KubeWaitOp ¶
KubeWaitOp returns an Operator to wait for Kubernetes resources gets initialized
func ProxyStopOp ¶ added in v1.20.4
ProxyStopOp returns an Operator to stop kube-proxy
func RebootDequeueOp ¶ added in v1.18.3
func RebootDequeueOp(entries []*cke.RebootQueueEntry) cke.Operator
RebootDequeueOp returns an Operator to dequeue reboot entries.
func RebootDrainStartOp ¶ added in v1.22.8
func RebootDrainStartOp(apiserver *cke.Node, entries []*cke.RebootQueueEntry, config *cke.Reboot) cke.InfoOperator
func RebootDrainTimeoutOp ¶ added in v1.22.8
func RebootDrainTimeoutOp(entries []*cke.RebootQueueEntry) cke.Operator
func RebootRebootOp ¶ added in v1.22.8
func RebootRebootOp(apiserver *cke.Node, entries []*cke.RebootQueueEntry, config *cke.Reboot) cke.InfoOperator
RebootRebootOp returns an Operator to reboot nodes.
func RebootUncordonOp ¶ added in v1.18.6
RebootUncordonOp returns an Operator to uncordon nodes.
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 ¶
SchedulerStopOp returns an Operator to stop kube-scheduler
Types ¶
This section is empty.