ctrl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetWorkersAsStatefulset

func GetWorkersAsStatefulset(client client.Client, key types.NamespacedName) (workers *appsv1.StatefulSet, err error)

GetWorkersAsStatefulset gets workers as statefulset object. if it returns deprecated errors, it indicates that not support anymore.

Types

type Helper

type Helper struct {
	// contains filtered or unexported fields
}

The common part of the engine which can be reused

func BuildHelper

func BuildHelper(runtimeInfo base.RuntimeInfoInterface, client client.Client, log logr.Logger) *Helper

func (*Helper) BuildWorkersAffinity

func (e *Helper) BuildWorkersAffinity(workers *appsv1.StatefulSet) (workersToUpdate *appsv1.StatefulSet, err error)

BuildWorkersAffinity builds workers affinity if it doesn't have

func (*Helper) CheckFuseHealthy

func (e *Helper) CheckFuseHealthy(recorder record.EventRecorder, runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	ds *appsv1.DaemonSet) (err error)

CheckFuseHealthy checks the ds healthy with role

func (*Helper) CheckMasterHealthy

func (e *Helper) CheckMasterHealthy(recorder record.EventRecorder, runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	sts *appsv1.StatefulSet) (err error)

CheckMasterHealthy checks the sts healthy with role

func (*Helper) CheckWorkersHealthy

func (e *Helper) CheckWorkersHealthy(recorder record.EventRecorder, runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	sts *appsv1.StatefulSet) (err error)

CheckworkersHealthy checks the sts healthy with role

func (*Helper) CheckWorkersReady

func (e *Helper) CheckWorkersReady(runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	workers *appsv1.StatefulSet) (ready bool, err error)

CheckWorkersReady checks if workers are ready

func (*Helper) CleanUpFuse

func (e *Helper) CleanUpFuse() (count int, err error)

CleanUpFuse will cleanup node label for Fuse.

func (*Helper) GetFuseNodes added in v0.9.0

func (e *Helper) GetFuseNodes() (nodes []corev1.Node, err error)

GetFuseNodes gets the node of fuses

func (*Helper) GetIpAddressesOfFuse added in v0.9.0

func (e *Helper) GetIpAddressesOfFuse() (ipAddresses []string, err error)

GetIpAddressesOfFuse gets Ipaddresses from the Fuse Node

func (*Helper) GetIpAddressesOfWorker added in v0.9.0

func (e *Helper) GetIpAddressesOfWorker() (ipAddresses []string, err error)

GetIpAddressesOfWorker gets Ipaddresses from the Worker Node

func (*Helper) GetWorkerNodes added in v0.9.0

func (e *Helper) GetWorkerNodes() (nodes []corev1.Node, err error)

func (*Helper) SetupWorkers

func (e *Helper) SetupWorkers(runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	workers *appsv1.StatefulSet) (err error)

SetupWorkers checks the desired and current replicas of workers and makes an update over the status by setting phases and conditions. The function calls for a status update and finally returns error if anything unexpected happens.

func (*Helper) SyncReplicas

func (e *Helper) SyncReplicas(ctx cruntime.ReconcileRequestContext,
	runtime base.RuntimeInterface,
	currentStatus datav1alpha1.RuntimeStatus,
	workers *appsv1.StatefulSet) (err error)

CheckWorkersReady checks if workers are ready

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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