tidbcluster

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 35 Imported by: 7

Documentation

Index

Constants

View Source
const (
	RequeueInterval = time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlInterface

type ControlInterface interface {
	// UpdateTidbCluster implements the control logic for StatefulSet creation, update, and deletion
	UpdateTidbCluster(*v1alpha1.TidbCluster) error
}

ControlInterface implements the control logic for updating TidbClusters and their children StatefulSets. It is implemented as an interface to allow for extensions that provide different semantics. Currently, there is only one implementation.

func NewDefaultTidbClusterControl

func NewDefaultTidbClusterControl(
	tcControl controller.TidbClusterControlInterface,
	pdMemberManager manager.Manager,
	pdMSMemberManager manager.Manager,
	tikvMemberManager manager.Manager,
	tidbMemberManager manager.Manager,
	tiproxyMemberManager manager.Manager,
	reclaimPolicyManager manager.Manager,
	metaManager manager.Manager,
	orphanPodsCleaner member.OrphanPodsCleaner,
	pvcCleaner member.PVCCleanerInterface,

	pvcModifier volumes.PVCModifierInterface,
	pvcReplacer volumes.PVCReplacerInterface,
	pumpMemberManager manager.Manager,
	tiflashMemberManager manager.Manager,
	ticdcMemberManager manager.Manager,
	discoveryManager member.TidbDiscoveryManager,
	tidbClusterStatusManager manager.Manager,
	conditionUpdater TidbClusterConditionUpdater,
	recorder record.EventRecorder) ControlInterface

NewDefaultTidbClusterControl returns a new instance of the default implementation TidbClusterControlInterface that implements the documented semantics for TidbClusters.

type Controller

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

Controller controls tidbclusters.

func NewController

func NewController(deps *controller.Dependencies) *Controller

NewController creates a tidbcluster controller.

func (*Controller) Name added in v1.4.5

func (c *Controller) Name() string

Name returns the name of the tidbcluster controller

func (*Controller) Run

func (c *Controller) Run(workers int, stopCh <-chan struct{})

Run runs the tidbcluster controller.

type FakeTidbClusterControlInterface added in v1.1.0

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

func NewFakeTidbClusterControlInterface added in v1.1.0

func NewFakeTidbClusterControlInterface() *FakeTidbClusterControlInterface

func (*FakeTidbClusterControlInterface) SetUpdateTCError added in v1.1.0

func (c *FakeTidbClusterControlInterface) SetUpdateTCError(err error)

func (*FakeTidbClusterControlInterface) UpdateTidbCluster added in v1.1.0

func (c *FakeTidbClusterControlInterface) UpdateTidbCluster(_ *v1alpha1.TidbCluster) error

type PodController added in v1.3.0

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

PodController control pods of tidb cluster. see docs/design-proposals/2021-11-24-graceful-reschedule-tikv-pod.md

func NewPodController added in v1.3.0

func NewPodController(deps *controller.Dependencies) *PodController

NewPodController create a PodController.

func (*PodController) Name added in v1.4.5

func (c *PodController) Name() string

Name returns the name of the PodController.

func (*PodController) Run added in v1.3.0

func (c *PodController) Run(workers int, stopCh <-chan struct{})

Run the controller.

type TidbClusterConditionUpdater added in v1.1.0

type TidbClusterConditionUpdater interface {
	Update(*v1alpha1.TidbCluster) error
}

TidbClusterConditionUpdater interface that translates cluster state into into tidb cluster status conditions.

Jump to

Keyboard shortcuts

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