Documentation ¶
Index ¶
Constants ¶
This section is empty.
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, tikvMemberManager manager.Manager, tidbMemberManager manager.Manager, reclaimPolicyManager manager.Manager, metaManager manager.Manager, orphanPodsCleaner member.OrphanPodsCleaner, pvcCleaner member.PVCCleanerInterface, pvcResizer member.PVCResizerInterface, pumpMemberManager manager.Manager, tiflashMemberManager manager.Manager, ticdcMemberManager manager.Manager, discoveryManager member.TidbDiscoveryManager, tidbClusterStatusManager manager.Manager, podRestarter member.PodRestarter, 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( kubeCli kubernetes.Interface, cli versioned.Interface, genericCli client.Client, informerFactory informers.SharedInformerFactory, kubeInformerFactory kubeinformers.SharedInformerFactory, autoFailover bool, pdFailoverPeriod time.Duration, tikvFailoverPeriod time.Duration, tidbFailoverPeriod time.Duration, tiflashFailoverPeriod time.Duration, ) *Controller
NewController creates a tidbcluster controller.
func (*Controller) Run ¶
func (tcc *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 (ftcc *FakeTidbClusterControlInterface) SetUpdateTCError(err error)
func (*FakeTidbClusterControlInterface) UpdateTidbCluster ¶ added in v1.1.0
func (ftcc *FakeTidbClusterControlInterface) UpdateTidbCluster(_ *v1alpha1.TidbCluster) error
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.