member

package
v1.0.0-20221102-166735... Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultStorageSize is the default pvc request storage size for dm
	DefaultStorageSize = "10Gi"
	// DefaultStorageName is the default pvc name
	DefaultStorageName = "dataflow"
)
View Source
const (
	FailedSetStoreLabels = "FailedSetStoreLabels"
)

Since the "Unhealthy" is a very universal event reason string, which could apply to all the tiflow cluster components, we should make a global event module, and put event related constants there.

View Source
const (
	LastAppliedConfigAnnotation = "pingcap.com/last-applied-configuration"
)

Variables

This section is empty.

Functions

func DeepCopyClientObject

func DeepCopyClientObject(input client.Object) client.Object

func GetLastAppliedConfig

func GetLastAppliedConfig(set *apps.StatefulSet) (*apps.StatefulSetSpec, *corev1.PodSpec, error)

GetLastAppliedConfig get last applied config info from Statefulset's annotation and the podTemplate's annotation

func NeedForceUpgrade

func NeedForceUpgrade(ann map[string]string) bool

NeedForceUpgrade check if force upgrade is necessary

func NewExecutorMemberManager

func NewExecutorMemberManager(cli client.Client, clientSet kubernetes.Interface) manager.TiflowManager

func NewMasterMemberManager

func NewMasterMemberManager(cli client.Client, clientSet kubernetes.Interface) manager.TiflowManager

func RenderExecutorStartScript

func RenderExecutorStartScript(model *TiflowExecutorStartScriptModel) (string, error)

func RenderTiflowMasterStartScript

func RenderTiflowMasterStartScript(model *TiflowMasterStartScriptModel) (string, error)

func TiflowExecutorPodName

func TiflowExecutorPodName(tcName string, ordinal int32) string

func TiflowMasterPeerSvcName

func TiflowMasterPeerSvcName(tcName string, ordinal int32) string

func TiflowMasterPodName

func TiflowMasterPodName(tcName string, ordinal int32) string

Types

type CommonModel

type CommonModel struct {
	ClusterDomain string // same as tc.spec.clusterDomain
}

func (CommonModel) FormatClusterDomain

func (c CommonModel) FormatClusterDomain() string

type Failover

type Failover interface {
	Failover(cluster *v1alpha1.TiflowCluster) error
	Recover(cluster *v1alpha1.TiflowCluster)
	RemoveUndesiredFailures(cluster *v1alpha1.TiflowCluster)
}

Failover implements the logic for tiflow cluster failover and recovery.

type MergeFn

type MergeFn func(existing, desired client.Object) error

MergeFn knows how to merge a desired object into the current object.

type Scaler

type Scaler interface {
	// Scale scales the cluster. It does nothing if scaling is not needed.
	Scale(meta metav1.Object, actual *apps.StatefulSet, desired *apps.StatefulSet) error
	// ScaleOut scales out the cluster
	ScaleOut(meta metav1.Object, actual *apps.StatefulSet, desired *apps.StatefulSet) error
	// ScaleIn scales in the cluster
	ScaleIn(meta metav1.Object, actual *apps.StatefulSet, desired *apps.StatefulSet) error
}

Scaler implements the logic for scaling out or scaling in the cluster.

func NewExecutorScaler

func NewExecutorScaler(clientSet kubernetes.Interface) Scaler

NewExecutorScaler return a executorScaler

func NewMasterScaler

func NewMasterScaler(cli client.Client, clientSet kubernetes.Interface) Scaler

NewMasterScaler returns a DMScaler

type TiflowExecutorStartScriptModel

type TiflowExecutorStartScriptModel struct {
	CommonModel
	DataDir       string
	MasterAddress string
}

type TiflowMasterStartScriptModel

type TiflowMasterStartScriptModel struct {
	CommonModel
	Scheme string
}

type Upgrader

type Upgrader interface {
	// Upgrade upgrade the cluster
	Upgrade(*v1alpha1.TiflowCluster, *apps.StatefulSet, *apps.StatefulSet) error
}

Upgrader implements the logic for upgrading the tiflow cluster.

func NewExecutorUpgrader

func NewExecutorUpgrader(cli client.Client) Upgrader

NewExecutorUpgrader returns a executorUpgrader

func NewMasterUpgrader

func NewMasterUpgrader(cli client.Client) Upgrader

NewMasterUpgrader returns a masterUpgrader

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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