reconcile

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStepBinder

func NewStepBinder(name string, f StepFunc) control.BindFunc

func NewStepIfBinder

func NewStepIfBinder(conditionName string, condFunc ConditionFunc, binders ...control.BindFunc) control.BindFunc

Types

type ConditionFunc

type ConditionFunc func(rc *Context, log logr.Logger) (bool, error)

type Context

type Context struct {
	*control.BaseReconcileContext
	// contains filtered or unexported fields
}

func NewContext

func NewContext(base *control.BaseReconcileContext, configLoader func() config.Config) *Context

func (*Context) Close

func (rc *Context) Close() error

func (*Context) Config

func (rc *Context) Config() config.Config

func (*Context) ContainsControllerHint

func (rc *Context) ContainsControllerHint(hint string) bool

func (*Context) Debug

func (rc *Context) Debug() bool

func (*Context) GetConfigMap

func (rc *Context) GetConfigMap(name string) (*corev1.ConfigMap, error)

func (*Context) GetHpfsClient

func (rc *Context) GetHpfsClient() (hpfs.HpfsServiceClient, error)

func (*Context) GetNodes

func (rc *Context) GetNodes() ([]corev1.Node, error)

func (*Context) GetXStore

func (rc *Context) GetXStore() (*polardbxv1.XStore, error)

func (*Context) GetXStoreAccountPassword

func (rc *Context) GetXStoreAccountPassword(user string) (string, error)

func (*Context) GetXStoreClusterAddr

func (rc *Context) GetXStoreClusterAddr(serviceType convention.ServiceType, port string) (string, error)

func (*Context) GetXStoreConfigMap

func (rc *Context) GetXStoreConfigMap(cmType convention.ConfigMapType) (*corev1.ConfigMap, error)

func (*Context) GetXStoreHeadlessServiceForPod

func (rc *Context) GetXStoreHeadlessServiceForPod(pod string) (*corev1.Service, error)

func (*Context) GetXStoreHeadlessServices

func (rc *Context) GetXStoreHeadlessServices() (map[string]corev1.Service, error)

func (*Context) GetXStoreJob

func (rc *Context) GetXStoreJob(jobName string) (*batchv1.Job, error)

func (*Context) GetXStorePod

func (rc *Context) GetXStorePod(name string) (*corev1.Pod, error)

func (*Context) GetXStorePods

func (rc *Context) GetXStorePods() ([]corev1.Pod, error)

func (*Context) GetXStoreSecret

func (rc *Context) GetXStoreSecret() (*corev1.Secret, error)

func (*Context) GetXStoreService

func (rc *Context) GetXStoreService(serviceType convention.ServiceType) (*corev1.Service, error)

func (*Context) IsXStoreChanged

func (rc *Context) IsXStoreChanged() bool

func (*Context) IsXStoreStatusChanged

func (rc *Context) IsXStoreStatusChanged() bool

func (*Context) MarkXStoreChanged

func (rc *Context) MarkXStoreChanged()

func (*Context) MustGetXStore

func (rc *Context) MustGetXStore() *polardbxv1.XStore

func (*Context) SetControllerRef

func (rc *Context) SetControllerRef(obj client.Object) error

func (*Context) SetControllerRefAndCreate

func (rc *Context) SetControllerRefAndCreate(obj client.Object) error

func (*Context) SetXStoreKey

func (rc *Context) SetXStoreKey(key types.NamespacedName)

func (*Context) TryGetXStoreLeaderPod

func (rc *Context) TryGetXStoreLeaderPod() (*corev1.Pod, error)

func (*Context) UpdateXStore

func (rc *Context) UpdateXStore() error

func (*Context) UpdateXStoreCondition

func (rc *Context) UpdateXStoreCondition(cond *polardbxv1xstore.Condition)

func (*Context) UpdateXStoreStatus

func (rc *Context) UpdateXStoreStatus() error

type Reconciler

type Reconciler interface {
	Reconcile(rc *Context, log logr.Logger, request reconcile.Request) (reconcile.Result, error)
}

type StepFunc

type StepFunc func(rc *Context, flow control.Flow) (reconcile.Result, error)

Jump to

Keyboard shortcuts

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