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: 28 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) GetDN

func (rc *Context) GetDN(i int) (*polardbxv1.XStore, error)

func (*Context) GetDNMap

func (rc *Context) GetDNMap() (map[int]*polardbxv1.XStore, error)

func (*Context) GetDeploymentMap

func (rc *Context) GetDeploymentMap(role string) (map[string]*appsv1.Deployment, error)

func (*Context) GetGMS

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

func (*Context) GetNodesSortedByName

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

func (*Context) GetOrderedDNList

func (rc *Context) GetOrderedDNList() ([]*polardbxv1.XStore, error)

func (*Context) GetPods

func (rc *Context) GetPods(role string) ([]corev1.Pod, error)

func (*Context) GetPolarDBX

func (rc *Context) GetPolarDBX() (*polardbxv1.PolarDBXCluster, error)

func (*Context) GetPolarDBXAccountPassword

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

func (*Context) GetPolarDBXClusterAddr

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

func (*Context) GetPolarDBXConfigMap

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

func (*Context) GetPolarDBXEncodeKey

func (rc *Context) GetPolarDBXEncodeKey() (string, error)

func (*Context) GetPolarDBXGMSManager

func (rc *Context) GetPolarDBXGMSManager() (gms.Manager, error)

func (*Context) GetPolarDBXGroupManager

func (rc *Context) GetPolarDBXGroupManager() (group.GroupManager, error)

func (*Context) GetPolarDBXMonitor

func (rc *Context) GetPolarDBXMonitor() (*polardbxv1.PolarDBXMonitor, error)

func (*Context) GetPolarDBXPasswordCipher

func (rc *Context) GetPolarDBXPasswordCipher() (security.PasswordCipher, error)

func (*Context) GetPolarDBXSecret

func (rc *Context) GetPolarDBXSecret(secretType convention.SecretType) (*corev1.Secret, error)

func (*Context) GetPolarDBXService

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

func (*Context) GetPolarDBXTlsCerts

func (rc *Context) GetPolarDBXTlsCerts() (map[string]string, error)

func (*Context) GetSecret

func (rc *Context) GetSecret(name string) (*corev1.Secret, error)

func (*Context) GetService

func (rc *Context) GetService(name string) (*corev1.Service, error)

func (*Context) GetSortedSchedulableNodes

func (rc *Context) GetSortedSchedulableNodes(nodeSelector *corev1.NodeSelector) ([]corev1.Node, error)

func (*Context) IsPolarDBXChanged

func (rc *Context) IsPolarDBXChanged() bool

func (*Context) IsPolarDBXStatusChanged

func (rc *Context) IsPolarDBXStatusChanged() bool

func (*Context) MarkPolarDBXChanged

func (rc *Context) MarkPolarDBXChanged()

func (*Context) MustGetPolarDBX

func (rc *Context) MustGetPolarDBX() *polardbxv1.PolarDBXCluster

func (*Context) MustGetPolarDBXMonitor

func (rc *Context) MustGetPolarDBXMonitor() *polardbxv1.PolarDBXMonitor

func (*Context) PolardbxMonitorKey

func (rc *Context) PolardbxMonitorKey() types.NamespacedName

func (*Context) SetControllerRef

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

func (*Context) SetControllerRefAndCreate

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

func (*Context) SetControllerRefAndUpdate

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

func (*Context) SetPolarDBXKey

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

func (*Context) SetPolardbxMonitorKey

func (rc *Context) SetPolardbxMonitorKey(polardbxMonitorKey types.NamespacedName)

func (*Context) UpdatePolarDBX

func (rc *Context) UpdatePolarDBX() error

func (*Context) UpdatePolarDBXStatus

func (rc *Context) UpdatePolarDBXStatus() 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