Documentation
¶
Index ¶
- func ConfigMapName(podName string) string
- func EnsureSubResourcesDeleted(ctx context.Context, c client.Client, f *v1alpha1.TiFlash) (wait bool, _ error)
- func PVCNewer() common.PVCNewer[*v1alpha1.TiFlash]
- func PersistentVolumeClaimName(podName, volName string) string
- func TaskConfigMap(state *ReconcileContext, c client.Client) task.Task
- func TaskContextInfoFromPD(state *ReconcileContext, cm pdm.PDClientManager, fcm fm.TiFlashClientManager) task.Task
- func TaskFinalizerDel(state *ReconcileContext, c client.Client, fcm fm.TiFlashClientManager) task.Task
- func TaskOfflineStore(state *ReconcileContext) task.Task
- func TaskPod(state *ReconcileContext, c client.Client) task.Task
- func TaskStatus(state *ReconcileContext, c client.Client) task.Task
- func TaskStoreLabels(state *ReconcileContext, c client.Client) task.Task
- func VolumeMount(name string, mount *v1alpha1.VolumeMount) *corev1.VolumeMount
- func VolumeName(volName string) string
- type ReconcileContext
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigMapName ¶
func TaskConfigMap ¶
func TaskConfigMap(state *ReconcileContext, c client.Client) task.Task
func TaskContextInfoFromPD ¶
func TaskContextInfoFromPD(state *ReconcileContext, cm pdm.PDClientManager, fcm fm.TiFlashClientManager) task.Task
func TaskFinalizerDel ¶
func TaskFinalizerDel(state *ReconcileContext, c client.Client, fcm fm.TiFlashClientManager) task.Task
TaskFinalizerDel deletes sub-resources and remove the finalizer from the instance CR. TODO: extract a common task for tikv and tiflash
func TaskOfflineStore ¶
func TaskOfflineStore(state *ReconcileContext) task.Task
TaskOfflineStore handles the two-step store deletion process based on spec.offline field. This implements the state machine for offline operations: Pending -> Active -> Completed/Failed/Canceled.
func TaskStatus ¶
func TaskStatus(state *ReconcileContext, c client.Client) task.Task
TODO(liubo02): extract to common task
func TaskStoreLabels ¶
func TaskStoreLabels(state *ReconcileContext, c client.Client) task.Task
func VolumeMount ¶
func VolumeMount(name string, mount *v1alpha1.VolumeMount) *corev1.VolumeMount
func VolumeName ¶
VolumeName returns the real spec.volumes[*].name of pod TODO(liubo02): extract to namer pkg
Types ¶
type ReconcileContext ¶
type ReconcileContext struct {
State
PDClient pdm.PDClient
Store *pdv1.Store
StoreLabels []*metapb.StoreLabel
PDSynced bool
}
func (*ReconcileContext) GetPDClient ¶
func (r *ReconcileContext) GetPDClient() pdm.PDClient
GetPDClient returns the PD client for API operations
func (*ReconcileContext) GetStoreID ¶
func (r *ReconcileContext) GetStoreID() string
GetStoreID returns the store ID for PD operations
func (*ReconcileContext) StoreNotExists ¶
func (r *ReconcileContext) StoreNotExists() bool
StoreNotExists returns true if the store does not exist in PD
type State ¶
type State interface {
common.TiFlashState
common.ClusterState
common.PodState
common.PodStateUpdater
common.InstanceState[*runtime.TiFlash]
common.ContextClusterNewer[*v1alpha1.TiFlash]
common.ContextObjectNewer[*v1alpha1.TiFlash]
common.StatusUpdater
common.StatusPersister[*v1alpha1.TiFlash]
common.StoreState
common.StoreStateUpdater
common.HealthyState
common.HealthyStateUpdater
stateutil.IFeatureGates
}
func NewState ¶
func NewState(key types.NamespacedName) State
Click to show internal directories.
Click to hide internal directories.