Documentation
¶
Index ¶
- Variables
- func AssertInstanceListCondition[S scope.Instance[F, T], F client.Object, T runtime.Instance](condType string, status metav1.ConditionStatus) func(items []F) error
- func AssertInstanceListHasOneDeleting[I client.Object](target *I) func(items []I) error
- func AssertInstanceListIsEmpty[I client.Object](items []I) error
- func AssertInstanceListIsRecreated[I client.Object](changeTime time.Time) func(items []I) error
- func AssertInstanceListVolumes[S scope.Instance[F, T], F client.Object, T runtime.Instance](volumes []v1alpha1.Volume) func([]F) error
- func AssertPDListHasLeader(items []*v1alpha1.PD) error
- func AssertPVCListVolumes[S scope.Instance[F, T], F client.Object, T runtime.Instance](instances []F, volumes []v1alpha1.Volume, expectExceeds bool) func([]*corev1.PersistentVolumeClaim) error
- func AssertTiFlashOfflineIsCompleted(expectTiFlash *v1alpha1.TiFlash) func(flash *v1alpha1.TiFlash) (bool, error)
- func AssertTiKVLeadersEvictedBeforeStoreRemoval(deleting int) func(kv *v1alpha1.TiKV) (bool, error)
- func AssertTiKVOfflineIsCompleted(expectTiKV *v1alpha1.TiKV) func(kv *v1alpha1.TiKV) (bool, error)
- func MaxPodsCreateTimestamp[S scope.Group[F, T], F client.Object, T runtime.Group](ctx context.Context, c client.Client, g F) (*time.Time, error)
- func WaitForClusterPDRegistered(ctx context.Context, c client.Client, tc *v1alpha1.Cluster, ...) error
- func WaitForClusterReady(ctx context.Context, c client.Client, ns, name string, timeout time.Duration) error
- func WaitForDMGroupsHealthy(ctx context.Context, c client.Client, dmg *v1alpha1.DMGroup, ...) error
- func WaitForDMWorkersHealthy(ctx context.Context, c client.Client, dwg *v1alpha1.DMWorkerGroup, ...) error
- func WaitForInstance[S scope.Instance[F, T], F client.Object, T runtime.Instance](ctx context.Context, c client.Client, instance F, cond func(instance F) error, ...) error
- func WaitForInstanceList[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF, cond func(items []I) error, ...) error
- func WaitForInstanceListCondition[GS scope.GroupInstance[GF, GT, IS], IS scope.InstanceList[IF, IT, IL], ...](ctx context.Context, c client.Client, g GF, condType string, ...) error
- func WaitForInstanceListDeleted[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF, timeout time.Duration) error
- func WaitForInstanceListRecreated[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF, changeTime time.Time, ...) error
- func WaitForJobComplete(ctx context.Context, c client.Client, job *batchv1.Job, timeout time.Duration) error
- func WaitForJobRunning(ctx context.Context, c client.Client, job *batchv1.Job, timeout time.Duration) error
- func WaitForKeyspaceCreated(ctx context.Context, pdc pdapi.PDClient, name string, timeout time.Duration) (*pdapi.KeyspaceMeta, error)
- func WaitForKeyspaceRegionsScheduled(ctx context.Context, c client.Client, pdc pdapi.PDClient, keyspaceID string, ...) error
- func WaitForList(ctx context.Context, c client.Client, list client.ObjectList, ...) error
- func WaitForListDeleted(ctx context.Context, c client.Client, list client.ObjectList, ...) error
- func WaitForObject(ctx context.Context, c client.Client, obj client.Object, cond func() error, ...) error
- func WaitForObjectCondition[S scope.Object[F, T], F client.Object, T runtime.Object](ctx context.Context, c client.Client, obj F, condType string, ...) error
- func WaitForObjectDeleted(ctx context.Context, c client.Client, obj client.Object, timeout time.Duration) error
- func WaitForObjectV2(ctx context.Context, c client.Client, obj client.Object, ...) error
- func WaitForOneInstanceDeleting[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, I], GF client.Object, ...](ctx context.Context, c client.Client, g GF, target *I, timeout time.Duration) error
- func WaitForPDsHealthy(ctx context.Context, c client.Client, pdg *v1alpha1.PDGroup, ...) error
- func WaitForPVCList[S scope.Group[F, T], F client.Object, T runtime.Group](ctx context.Context, c client.Client, g F, ...) error
- func WaitForPlacementPolicySynced(ctx context.Context, c client.Client, policy *v1alpha1.PlacementPolicy, ...) error
- func WaitForPlacementRuleExists(ctx context.Context, pdc pdapi.PDClient, policy *v1alpha1.PlacementPolicy, ...) error
- func WaitForPodReadyInNamespace(ctx context.Context, c client.Client, pod *corev1.Pod, timeout time.Duration) error
- func WaitForPodsCondition[G runtime.Group](ctx context.Context, c client.Client, g G, cond func(pod *corev1.Pod) error, ...) error
- func WaitForPodsDeleted[S scope.Group[F, T], F client.Object, T runtime.Group](ctx context.Context, c client.Client, g F, timeout time.Duration) error
- func WaitForPodsReady[G runtime.Group](ctx context.Context, c client.Client, g G, timeout time.Duration) error
- func WaitForPodsRecreated[G runtime.Group](ctx context.Context, c client.Client, g G, changeTime time.Time, ...) error
- func WaitForResourceManagersHealthy(ctx context.Context, c client.Client, rmg *v1alpha1.ResourceManagerGroup, ...) error
- func WaitForRoutersHealthy(ctx context.Context, c client.Client, rg *v1alpha1.RouterGroup, ...) error
- func WaitForSchedulingsHealthy(ctx context.Context, c client.Client, sg *v1alpha1.SchedulingGroup, ...) error
- func WaitForStoreLabelValue(ctx context.Context, c client.Client, pdc pdapi.PDClient, ...) error
- func WaitForStoreRegionCount(ctx context.Context, c client.Client, pdc pdapi.PDClient, ...) error
- func WaitForStoreRegionCountAtLeast(ctx context.Context, c client.Client, pdc pdapi.PDClient, ...) error
- func WaitForTSOsHealthy(ctx context.Context, c client.Client, tg *v1alpha1.TSOGroup, ...) error
- func WaitForTiCDCsHealthy(ctx context.Context, c client.Client, cg *v1alpha1.TiCDCGroup, ...) error
- func WaitForTiDBsHealthy(ctx context.Context, c client.Client, dbg *v1alpha1.TiDBGroup, ...) error
- func WaitForTiFlashesHealthy(ctx context.Context, c client.Client, fg *v1alpha1.TiFlashGroup, ...) error
- func WaitForTiKVWorkersHealthy(ctx context.Context, c client.Client, wg *v1alpha1.TiKVWorkerGroup, ...) error
- func WaitForTiKVsHealthy(ctx context.Context, c client.Client, kvg *v1alpha1.TiKVGroup, ...) error
- func WaitForTiProxysHealthy(ctx context.Context, c client.Client, proxyg *v1alpha1.TiProxyGroup, ...) error
- func WaitForVolumeCapacityExceedsRequest[GS scope.GroupInstance[GF, GT, IS], IS scope.InstanceList[IF, IT, IL], ...](ctx context.Context, c client.Client, group GF, exceeds int, ...) error
- func WaitPodsRollingUpdateOnce[S scope.Group[F, T], F client.Object, T runtime.Group](ctx context.Context, c client.Client, g F, to int, surge int, noRestart bool, ...) error
- func WatchUntilInstanceList[GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, PI], GF client.Object, ...](ctx context.Context, c client.Client, g GF, cond func(item PI) (bool, error), ...) error
- func WatchUntilTiKVsRestartedAfterCacheTTL(ctx context.Context, c client.Client, kvg *v1alpha1.TiKVGroup, ...) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AssertInstanceListVolumes ¶
func AssertInstanceListVolumes[S scope.Instance[F, T], F client.Object, T runtime.Instance]( volumes []v1alpha1.Volume, ) func([]F) error
AssertInstanceListVolumes checks that active instances request the expected volume storage.
func AssertPDListHasLeader ¶
func AssertPVCListVolumes ¶
func AssertPVCListVolumes[S scope.Instance[F, T], F client.Object, T runtime.Instance]( instances []F, volumes []v1alpha1.Volume, expectExceeds bool, ) func([]*corev1.PersistentVolumeClaim) error
AssertPVCListVolumes checks PVCs for the given instances. When expectExceeds is true, each instance must have at least one PVC whose storage exceeds the group request; otherwise all PVCs must match. Every PVC must have at least the requested capacity. Unrelated PVCs are ignored.
func MaxPodsCreateTimestamp ¶
func WaitForClusterReady ¶
func WaitForDMGroupsHealthy ¶
func WaitForDMWorkersHealthy ¶
func WaitForInstance ¶
func WaitForInstanceList ¶
func WaitForInstanceListCondition ¶
func WaitForInstanceListCondition[ GS scope.GroupInstance[GF, GT, IS], IS scope.InstanceList[IF, IT, IL], GF client.Object, GT runtime.Group, IF client.Object, IT runtime.Instance, IL client.ObjectList, ]( ctx context.Context, c client.Client, g GF, condType string, status metav1.ConditionStatus, timeout time.Duration, ) error
func WaitForJobComplete ¶
func WaitForJobRunning ¶
func WaitForKeyspaceCreated ¶
func WaitForList ¶
func WaitForListDeleted ¶
func WaitForObject ¶
func WaitForObjectCondition ¶
func WaitForObjectDeleted ¶
func WaitForObjectV2 ¶
func WaitForPDsHealthy ¶
func WaitForPVCList ¶
func WaitForPVCList[S scope.Group[F, T], F client.Object, T runtime.Group]( ctx context.Context, c client.Client, g F, cond func([]*corev1.PersistentVolumeClaim) error, timeout time.Duration, ) error
WaitForPVCList waits for the group's PVC list to satisfy cond. The list may include PVCs retained after scale-in, so the callback determines the expected count.
func WaitForPodReadyInNamespace ¶
func WaitForPodReadyInNamespace(ctx context.Context, c client.Client, pod *corev1.Pod, timeout time.Duration) error
WaitForPodReadyInNamespace waits the given timeout duration for the specified pod to be ready and running.
func WaitForPodsCondition ¶
func WaitForPodsDeleted ¶
func WaitForPodsReady ¶
func WaitForPodsRecreated ¶
func WaitForPodsRecreated[G runtime.Group]( ctx context.Context, c client.Client, g G, changeTime time.Time, timeout time.Duration, ) error
WaitForPodsRecreated check all pods are created after change time TODO(liubo02): changeTime should be changed to pods, check all input pods not exist
func WaitForRoutersHealthy ¶
func WaitForStoreLabelValue ¶
func WaitForStoreRegionCount ¶
func WaitForTSOsHealthy ¶
func WaitForTiCDCsHealthy ¶
func WaitForTiDBsHealthy ¶
func WaitForTiFlashesHealthy ¶
func WaitForTiKVsHealthy ¶
func WaitForTiProxysHealthy ¶
func WaitForVolumeCapacityExceedsRequest ¶
func WaitForVolumeCapacityExceedsRequest[ GS scope.GroupInstance[GF, GT, IS], IS scope.InstanceList[IF, IT, IL], GF client.Object, GT runtime.Group, IF client.Object, IT runtime.Instance, IL client.ObjectList, ](ctx context.Context, c client.Client, group GF, exceeds int, timeout time.Duration) error
WaitForVolumeCapacityExceedsRequest first checks instance requests and conditions, then their PVCs. exceeds is the expected number of instances with VolumeCapacityExceedsRequest=True. Retained PVCs without an active instance are ignored.
func WaitPodsRollingUpdateOnce ¶
func WaitPodsRollingUpdateOnce[ S scope.Group[F, T], F client.Object, T runtime.Group, ]( ctx context.Context, c client.Client, g F, to int, surge int, noRestart bool, timeout time.Duration, synced chan struct{}, ) error
WaitPodsRollingUpdateOnce observes pods until the context ends or timeout expires. If noRestart is true, only scaling is expected; retained pods must not be recreated during observation. nolint: gocyclo // optimize later
func WatchUntilInstanceList ¶
func WatchUntilInstanceList[ GS scope.GroupInstance[GF, GT, IS], IS scope.List[IL, PI], GF client.Object, GT runtime.Group, IL client.ObjectList, PI scope.ClientObject[I], I any, ]( ctx context.Context, c client.Client, g GF, cond func(item PI) (bool, error), timeout time.Duration, synced chan struct{}, ) error
WatchUntilInstanceList use watch to ensure something is not happened
func WatchUntilTiKVsRestartedAfterCacheTTL ¶
func WatchUntilTiKVsRestartedAfterCacheTTL( ctx context.Context, c client.Client, kvg *v1alpha1.TiKVGroup, timeout time.Duration, synced chan struct{}, ) error
WatchUntilTiKVsRestartedAfterCacheTTL watches TiKV leader eviction and recovery transitions and verifies every recreated Pod observes the configured cache TTL.
Types ¶
This section is empty.