ctrl

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) 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