v1alpha1

package
v0.0.0-...-9ab11c5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=pingcap.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "pingcap.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func NewGenericConfig

func NewGenericConfig() *config.GenericConfig

Types

type ClusterRef

type ClusterRef struct {
	// Namespace is the namespace that TiflowCluster object locates
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Name is the name of TiflowCluster object
	Name string `json:"name"`

	// ClusterDomain is the domain of TiflowCluster object
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`
}

ClusterRef reference to a TiflowCluster

func (*ClusterRef) DeepCopy

func (in *ClusterRef) DeepCopy() *ClusterRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRef.

func (*ClusterRef) DeepCopyInto

func (in *ClusterRef) DeepCopyInto(out *ClusterRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterSyncType

type ClusterSyncType struct {
	// Name of the Sync type
	// +required
	Name SyncTypeName `json:"name"`
	// (Optional) Message related to the status of the Sync
	// +optional
	Message string `json:"message,omitempty"`
	// Status of SyncType: Failed, Ongoing, Completed or Unknown
	// +required
	Status SyncTypeStatus `json:"status"`
	// LastUpdateTime means the time when the status of Sync was updated
	// +required
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`
}

ClusterSyncType represents master or executor cluster's sync status as it is perceived by the operator

func (*ClusterSyncType) DeepCopy

func (in *ClusterSyncType) DeepCopy() *ClusterSyncType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSyncType.

func (*ClusterSyncType) DeepCopyInto

func (in *ClusterSyncType) DeepCopyInto(out *ClusterSyncType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ComponentSpec

type ComponentSpec struct {
	// BaseImage of the component. Override the cluster-level baseImage if present
	BaseImage string `json:"baseImage,omitempty"`

	// Version of the component. Override the cluster-level version if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Version *string `json:"version,omitempty"`

	// ImagePullPolicy of the component. Override the cluster-level imagePullPolicy if present
	// Optional: Defaults to cluster-level setting
	// +optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// Whether Hostnetwork of the component is enabled. Override the cluster-level setting if present
	// Optional: Defaults to cluster-level setting
	// +optional
	HostNetwork *bool `json:"hostNetwork,omitempty"`

	// Affinity of the component. Override the cluster-level setting if present.
	// Optional: Defaults to cluster-level setting
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// PriorityClassName of the component. Override the cluster-level one if present
	// Optional: Defaults to cluster-level setting
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// NodeSelector of the component. Merged into the cluster-level nodeSelector if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Annotations for the component. Merge into the cluster-level annotations if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Labels for the component. Merge into the cluster-level labels if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Tolerations of the component. Override the cluster-level tolerations if non-empty
	// Optional: Defaults to cluster-level setting
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PodSecurityContext of the component
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// ConfigUpdateStrategy of the component. Override the cluster-level updateStrategy if present
	// Optional: Defaults to cluster-level setting
	// +optional
	ConfigUpdateStrategy *ConfigUpdateStrategy `json:"configUpdateStrategy,omitempty"`

	// List of environment variables to set in the container, like v1.Container.Env.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// Extend the use scenarios for env
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

	// Init containers of the components
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// Additional containers of the component.
	// +optional
	AdditionalContainers []corev1.Container `json:"additionalContainers,omitempty"`

	// Additional volumes of component pod.
	// +optional
	AdditionalVolumes []corev1.Volume `json:"additionalVolumes,omitempty"`

	// Additional volume mounts of component pod.
	AdditionalVolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty"`

	// DNSConfig Specifies the DNS parameters of a pod.
	// +optional
	DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`

	// DNSPolicy Specifies the DNSPolicy parameters of a pod.
	// +optional
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
	// Value must be non-negative integer. The value zero indicates delete immediately.
	// If this value is nil, the default grace period will be used instead.
	// The grace period is the duration in seconds after the processes running in the pod are sent
	// a termination signal and the time when the processes are forcibly halted with a kill signal.
	// Set this value longer than the expected cleanup time for your process.
	// Defaults to 30 seconds.
	// +optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

	// StatefulSetUpdateStrategy indicates the StatefulSetUpdateStrategy that will be
	// employed to update Pods in the StatefulSet when a revision is made to
	// Template.
	// +optional
	StatefulSetUpdateStrategy apps.StatefulSetUpdateStrategyType `json:"statefulSetUpdateStrategy,omitempty"`

	// PodManagementPolicy of TiFlow cluster StatefulSets
	// +optional
	PodManagementPolicy apps.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`

	// TopologySpreadConstraints describes how a group of pods ought to spread across topology
	// domains. Scheduler will schedule pods in a way which abides by the constraints.
	// This field is only honored by clusters that enables the EvenPodsSpread feature.
	// All topologySpreadConstraints are ANDed.
	// +optional
	// +listType=map
	// +listMapKey=topologyKey
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

ComponentSpec is the base spec of each component, the fields should always accessed by the Basic<Component>Spec() method to respect the cluster-level properties +k8s:openapi-gen=true

func (*ComponentSpec) DeepCopy

func (in *ComponentSpec) DeepCopy() *ComponentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.

func (*ComponentSpec) DeepCopyInto

func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigUpdateStrategy

type ConfigUpdateStrategy string

ConfigUpdateStrategy represents the strategy to update configuration

const (
	// ConfigUpdateStrategyInPlace update the configmap without changing the name
	ConfigUpdateStrategyInPlace ConfigUpdateStrategy = "InPlace"
	// ConfigUpdateStrategyRollingUpdate generate different configmap on configuration update and
	// try to rolling-update the pod controller (e.g. statefulset) to apply updates.
	ConfigUpdateStrategyRollingUpdate ConfigUpdateStrategy = "RollingUpdate"
)

type ExecutorMember

type ExecutorMember struct {
	Id     string            `json:"id,omitempty"`
	Name   string            `json:"name,omitempty"`
	Addr   string            `json:"addr,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
	// TODO: add cpu/memory/disk usage later
	// Last time the health transitioned from one to another.
	// +nullable
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

ExecutorMember is Tiflow-executor member status

func (*ExecutorMember) DeepCopy

func (in *ExecutorMember) DeepCopy() *ExecutorMember

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutorMember.

func (*ExecutorMember) DeepCopyInto

func (in *ExecutorMember) DeepCopyInto(out *ExecutorMember)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutorPhaseType

type ExecutorPhaseType string

ExecutorPhaseType indicates the cluster's state of executors

const (
	ExecutorRunning     ExecutorPhaseType = "Running"
	ExecutorStarting    ExecutorPhaseType = "Starting"
	ExecutorCreating    ExecutorPhaseType = "Creating"
	ExecutorUpgrading   ExecutorPhaseType = "Upgrading"
	ExecutorScalingOut  ExecutorPhaseType = "ScalingOut"
	ExecutorScalingIn   ExecutorPhaseType = "ScalingIn"
	ExecutorScalingUp   ExecutorPhaseType = "ScalingUp"
	ExecutorScalingDown ExecutorPhaseType = "ScalingDown"
	ExecutorDeleting    ExecutorPhaseType = "Deleting"
	ExecutorFailed      ExecutorPhaseType = "Failed"
	ExecutorUnknown     ExecutorPhaseType = "Unknown"
)

type ExecutorSpec

type ExecutorSpec struct {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tiflow
	// +optional
	BaseImage string `json:"baseImage,omitempty"`

	// MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover.
	// Optional: Defaults to 3
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxFailoverCount *int32 `json:"maxFailoverCount,omitempty"`

	// The storageClassName of the persistent volume for tiflow-executor data storage.
	// Defaults to Kubernetes default storage class.
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`

	// StorageSize is the request storage size for tiflow-executor.
	// Defaults to "10Gi".
	// +optional
	StorageSize string `json:"storageSize,omitempty"`

	// Subdirectory within the volume to store tiflow-executor Data. By default, the data
	// is stored in the root directory of volume which is mounted at
	// /tmp/tiflow-executor.
	// Specifying this will change the data directory to a subdirectory, e.g.
	// /tmp/tiflow-executor/data if you set the value to "data".
	// It's dangerous to change this value for a running cluster as it will
	// upgrade your cluster to use a new storage directory.
	// Defaults to "" (volume's root).
	// +optional
	DataSubDir string `json:"dataSubDir,omitempty"`

	// TLSClientSecretNames are the names of secrets which stores upstream/downstream client certificates
	// that used by tiflow-executor.
	// +optional
	TLSClientSecretNames []string `json:"tlsClientSecretNames,omitempty"`

	// Persistent volume reclaim policy applied to the PVs that consumed by tiflow cluster
	// +kubebuilder:default=Retain
	PVReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"pvReclaimPolicy,omitempty"`

	// Stateful indicates whether this executor will deal with stateful jobs preferentially.
	// If enabled, master will firstly arrange stateful jobs to this kind of executors and operator will keep this executor's data for more time.
	// +kubebuilder:default=false
	// +optional
	Stateful bool `json:"stateful"`

	// Config is the Configuration of tiflow-executor-servers
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:XPreserveUnknownFields
	Config *config.GenericConfig `json:"config,omitempty"`
}

ExecutorSpec defines the desired state of tiflow executor

func (*ExecutorSpec) DeepCopy

func (in *ExecutorSpec) DeepCopy() *ExecutorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutorSpec.

func (*ExecutorSpec) DeepCopyInto

func (in *ExecutorSpec) DeepCopyInto(out *ExecutorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExecutorStatus

type ExecutorStatus struct {
	Image          string                    `json:"image,omitempty"`
	StatefulSet    *apps.StatefulSetStatus   `json:"statefulSet,omitempty"`
	Members        map[string]ExecutorMember `json:"members,omitempty"`
	PeerMembers    map[string]ExecutorMember `json:"peerMembers,omitempty"`
	FailureMembers map[string]ExecutorMember `json:"failureMembers,omitempty"`
	FailoverUID    types.UID                 `json:"failoverUID,omitempty"`
	// Volumes contains the status of all volumes.
	Volumes map[string]*StorageVolumeStatus `json:"volumes,omitempty"`
	// LastUpdateTime means the time when the status of Executor cluster's info was updated
	// +required
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`

	// Phase represents the observed state of a tiflow executor
	// Update by sync types
	// +required
	Phase ExecutorPhaseType `json:"phase,omitempty"`
	// (Optional) Message related to the status of the ExecutorCluster
	// +optional
	Message string `json:"message,omitempty"`
	// +nullable
	SyncTypes []ClusterSyncType `json:"syncTypes,omitempty"`
	// LastTransitionTime means the time when the status of Executor Phase
	// transitioned from one to another.
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

ExecutorStatus defines the desired state of tiflow executor

func (*ExecutorStatus) DeepCopy

func (in *ExecutorStatus) DeepCopy() *ExecutorStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecutorStatus.

func (*ExecutorStatus) DeepCopyInto

func (in *ExecutorStatus) DeepCopyInto(out *ExecutorStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FrameStandaloneSpec

type FrameStandaloneSpec struct {
	// mysql-standalone-sample
	Name string `json:"name"`

	Image string `json:"image"`

	Size *int32 `json:"size,omitempty"`

	Platform string `json:"platform,omitempty"`

	Port int32 `json:"port"`
}

func (*FrameStandaloneSpec) DeepCopy

func (in *FrameStandaloneSpec) DeepCopy() *FrameStandaloneSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrameStandaloneSpec.

func (*FrameStandaloneSpec) DeepCopyInto

func (in *FrameStandaloneSpec) DeepCopyInto(out *FrameStandaloneSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MasterMember

type MasterMember struct {
	Id       string `json:"id,omitempty"`
	Address  string `json:"address,omitempty"`
	IsLeader bool   `json:"is_leader,omitempty"`
	// member id is actually an uint64, but apimachinery's json only treats numbers as int64/float64
	// so uint64 may overflow int64 and thus convert to float64
	Name          string `json:"name,omitempty"`
	ClientURL     string `json:"clientURL"`
	MemberDeleted bool   `json:"memberDeleted,omitempty"`
	// Last time the health transitioned from one to another.
	// +nullable
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

MasterMember is Tiflow-master member status

func (*MasterMember) DeepCopy

func (in *MasterMember) DeepCopy() *MasterMember

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterMember.

func (*MasterMember) DeepCopyInto

func (in *MasterMember) DeepCopyInto(out *MasterMember)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MasterPhaseType

type MasterPhaseType string

MasterPhaseType indicates the cluster's state of masters

const (
	MasterRunning     MasterPhaseType = "Running"
	MasterStarting    MasterPhaseType = "Starting"
	MasterCreating    MasterPhaseType = "Creating"
	MasterUpgrading   MasterPhaseType = "Upgrading"
	MasterScalingOut  MasterPhaseType = "ScalingOut"
	MasterScalingIn   MasterPhaseType = "ScalingIn"
	MasterScalingUp   MasterPhaseType = "ScalingUp"
	MasterScalingDown MasterPhaseType = "ScalingDown"
	MasterDeleting    MasterPhaseType = "Deleting"
	MasterFailed      MasterPhaseType = "Failed"
	MasterUnknown     MasterPhaseType = "Unknown"
)

type MasterSpec

type MasterSpec struct {
	ComponentSpec               `json:",inline"`
	corev1.ResourceRequirements `json:",inline"`

	// The desired ready replicas
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas"`

	// Base image of the component, image tag is now allowed during validation
	// +kubebuilder:default=pingcap/tiflow
	// +optional
	BaseImage string `json:"baseImage"`

	// Service defines a Kubernetes service of Master cluster.
	// Optional: Defaults to `.spec.services` in favor of backward compatibility
	// +optional
	Service *ServiceSpec `json:"service,omitempty"`

	// TLSClientSecretNames are the names of secrets which stores etcd/metastore client certificates
	// that used by tiflow-master.
	// +optional
	TLSClientSecretNames []string `json:"tlsClientSecretNames,omitempty"`

	// MaxFailoverCount limit the max replicas could be added in failover, 0 means no failover.
	// Optional: Defaults to 3
	// +kubebuilder:validation:Minimum=0
	// +optional
	MaxFailoverCount int `json:"maxFailoverCount"`

	// Config is the Configuration of tiflow-master-servers
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:validation:XPreserveUnknownFields
	Config *config.GenericConfig `json:"config,omitempty"`
}

MasterSpec defines the desired state of tiflow master

func (*MasterSpec) DeepCopy

func (in *MasterSpec) DeepCopy() *MasterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterSpec.

func (*MasterSpec) DeepCopyInto

func (in *MasterSpec) DeepCopyInto(out *MasterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MasterStatus

type MasterStatus struct {
	Image string `json:"image,omitempty"`
	// +required
	ServerAddress  string                  `json:"serverAddress"`
	Leader         MasterMember            `json:"leader,omitempty"`
	Members        map[string]MasterMember `json:"members,omitempty"`
	PeerMembers    map[string]MasterMember `json:"peerMembers,omitempty"`
	FailureMembers map[string]MasterMember `json:"failureMembers,omitempty"`
	StatefulSet    *apps.StatefulSetStatus `json:"statefulSet,omitempty"`
	// LastUpdateTime means the time when the status of Master cluster's info was updated
	// +required
	LastUpdateTime metav1.Time `json:"lastUpdateTime"`

	// Phase represents the observed state of a tiflow master
	// Update by sync types
	// +required
	Phase MasterPhaseType `json:"phase,omitempty"`
	// (Optional) Message related to the status of the MasterCluster
	// +optional
	Message string `json:"message,omitempty"`
	// +nullable
	SyncTypes []ClusterSyncType `json:"syncTypes,omitempty"`
	// LastTransitionTime means the time when the status of Cluster Phase
	// transitioned from one to another
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
}

MasterStatus defines the desired state of tiflow master

func (*MasterStatus) DeepCopy

func (in *MasterStatus) DeepCopy() *MasterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterStatus.

func (*MasterStatus) DeepCopyInto

func (in *MasterStatus) DeepCopyInto(out *MasterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MemberType

type MemberType string
const (
	TiFlowMasterMemberType   MemberType = "tiflow-master"
	TiFlowExecutorMemberType MemberType = "tiflow-executor"
)

func (MemberType) String

func (mt MemberType) String() string

type ObservedStorageVolumeStatus

type ObservedStorageVolumeStatus struct {
	// BoundCount is the count of bound volumes.
	// +optional
	BoundCount int `json:"boundCount"`
	// CurrentCount is the count of volumes whose capacity is equal to `currentCapacity`.
	// +optional
	CurrentCount int `json:"currentCount"`
	// ResizedCount is the count of volumes whose capacity is equal to `resizedCapacity`.
	// +optional
	ResizedCount int `json:"resizedCount"`
	// CurrentCapacity is the current capacity of the volume.
	// If any volume is resizing, it is the capacity before resizing.
	// If all volumes are resized, it is the resized capacity and same as desired capacity.
	CurrentCapacity resource.Quantity `json:"currentCapacity"`
	// ResizedCapacity is the desired capacity of the volume.
	ResizedCapacity resource.Quantity `json:"resizedCapacity"`
}

func (*ObservedStorageVolumeStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedStorageVolumeStatus.

func (*ObservedStorageVolumeStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceSpec

type ServiceSpec struct {
	// Type of the real kubernetes service
	Type corev1.ServiceType `json:"type,omitempty"`

	// Additional annotations for the service
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Additional labels for the service
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// LoadBalancerIP is the loadBalancerIP of service
	// Optional: Defaults to omitted
	// +optional
	LoadBalancerIP *string `json:"loadBalancerIP,omitempty"`

	// ClusterIP is the clusterIP of service
	// +optional
	ClusterIP *string `json:"clusterIP,omitempty"`

	// PortName is the name of service port
	// +optional
	PortName *string `json:"portName,omitempty"`

	// The port that will be exposed by this service.
	//
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +optional
	NodePort *int32 `json:"port,omitempty"`

	// LoadBalancerSourceRanges is the loadBalancerSourceRanges of service
	// If specified and supported by the platform, this will restrict traffic through the cloud-provider
	// load-balancer will be restricted to the specified client IPs. This field will be ignored if the
	// cloud-provider does not support the feature."
	// More info: https://kubernetes.io/docs/concepts/services-networking/service/#aws-nlb-support
	// Optional: Defaults to omitted
	// +optional
	LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges,omitempty"`

	// ExternalTrafficPolicy of the service
	// Optional: Defaults to omitted
	// +optional
	ExternalTrafficPolicy *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"` // Expose the tiflow cluster mysql port to MySQLNodePort
}

ServiceSpec specifies the service object in k8s +k8s:openapi-gen=true

func (*ServiceSpec) DeepCopy

func (in *ServiceSpec) DeepCopy() *ServiceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.

func (*ServiceSpec) DeepCopyInto

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Standalone

type Standalone struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   StandaloneSpec   `json:"spec,omitempty"`
	Status StandaloneStatus `json:"status,omitempty"`
}

Standalone is the Schema for the standalones API

func (*Standalone) DeepCopy

func (in *Standalone) DeepCopy() *Standalone

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Standalone.

func (*Standalone) DeepCopyInto

func (in *Standalone) DeepCopyInto(out *Standalone)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Standalone) DeepCopyObject

func (in *Standalone) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StandaloneList

type StandaloneList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Standalone `json:"items"`
}

StandaloneList contains a list of Standalone

func (*StandaloneList) DeepCopy

func (in *StandaloneList) DeepCopy() *StandaloneList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandaloneList.

func (*StandaloneList) DeepCopyInto

func (in *StandaloneList) DeepCopyInto(out *StandaloneList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*StandaloneList) DeepCopyObject

func (in *StandaloneList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StandaloneSpec

type StandaloneSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Name            string              `json:"name"`
	FrameStandalone FrameStandaloneSpec `json:"frameStandalone,omitempty"`
}

StandaloneSpec defines the desired state of Standalone

func (*StandaloneSpec) DeepCopy

func (in *StandaloneSpec) DeepCopy() *StandaloneSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandaloneSpec.

func (*StandaloneSpec) DeepCopyInto

func (in *StandaloneSpec) DeepCopyInto(out *StandaloneSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StandaloneStatus

type StandaloneStatus struct {
}

StandaloneStatus defines the observed state of Standalone

func (*StandaloneStatus) DeepCopy

func (in *StandaloneStatus) DeepCopy() *StandaloneStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StandaloneStatus.

func (*StandaloneStatus) DeepCopyInto

func (in *StandaloneStatus) DeepCopyInto(out *StandaloneStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageVolumeName

type StorageVolumeName string

StorageVolumeName is the volume name which is same as `volumes.name` in Pod spec.

type StorageVolumeStatus

type StorageVolumeStatus struct {
	ObservedStorageVolumeStatus `json:",inline"`
	// Name is the volume name which is same as `volumes.name` in Pod spec.
	Name StorageVolumeName `json:"name"`
}

StorageVolumeStatus is the actual status for a storage

func (*StorageVolumeStatus) DeepCopy

func (in *StorageVolumeStatus) DeepCopy() *StorageVolumeStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVolumeStatus.

func (*StorageVolumeStatus) DeepCopyInto

func (in *StorageVolumeStatus) DeepCopyInto(out *StorageVolumeStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SyncTypeName

type SyncTypeName int

SyncTypeName type alias

const (
	CreateType SyncTypeName = iota
	UpgradeType
	ScaleOutType
	ScaleInType
	ScaleUpType
	ScaleDownType
	DeleteType
)

All possible Sync type's name

func (SyncTypeName) GetExecutorClusterPhase

func (a SyncTypeName) GetExecutorClusterPhase() ExecutorPhaseType

func (SyncTypeName) GetMasterClusterPhase

func (a SyncTypeName) GetMasterClusterPhase() MasterPhaseType

type SyncTypeStatus

type SyncTypeStatus int

SyncTypeStatus indicates the current status of SyncType

const (
	// Failed status means this SyncType is failed
	Failed SyncTypeStatus = iota
	// Ongoing status means this SyncType is ongoing
	Ongoing
	// Completed status means this SyncType is completed
	Completed
	// Unknown status means this SyncType is unknown
	Unknown
)

func (SyncTypeStatus) String

func (a SyncTypeStatus) String() string

type TiflowCluster

type TiflowCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TiflowClusterSpec   `json:"spec,omitempty"`
	Status TiflowClusterStatus `json:"status,omitempty"`
}

TiflowCluster is the Schema for the tiflowclusters API +k8s:openapi-gen=true +k8s:deepcopy-gen=true +kubebuilder:resource:shortName="tfc"

func (*TiflowCluster) AllExecutorMembersReady

func (tc *TiflowCluster) AllExecutorMembersReady() bool

func (*TiflowCluster) AllMasterMembersReady

func (tc *TiflowCluster) AllMasterMembersReady() bool

func (*TiflowCluster) DeepCopy

func (in *TiflowCluster) DeepCopy() *TiflowCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiflowCluster.

func (*TiflowCluster) DeepCopyInto

func (in *TiflowCluster) DeepCopyInto(out *TiflowCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TiflowCluster) DeepCopyObject

func (in *TiflowCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TiflowCluster) ExecutorActualMembers

func (tc *TiflowCluster) ExecutorActualMembers() int32

func (*TiflowCluster) ExecutorActualPeerMembers

func (tc *TiflowCluster) ExecutorActualPeerMembers() int32

func (*TiflowCluster) ExecutorAllMembers

func (tc *TiflowCluster) ExecutorAllMembers() int32

func (*TiflowCluster) ExecutorImage

func (tc *TiflowCluster) ExecutorImage() string

func (*TiflowCluster) ExecutorScaling

func (tc *TiflowCluster) ExecutorScaling() bool

func (*TiflowCluster) ExecutorStsActualReplicas

func (tc *TiflowCluster) ExecutorStsActualReplicas() int32

func (*TiflowCluster) ExecutorStsCurrentReplicas

func (tc *TiflowCluster) ExecutorStsCurrentReplicas() int32

func (*TiflowCluster) ExecutorStsDesiredReplicas

func (tc *TiflowCluster) ExecutorStsDesiredReplicas() int32

func (*TiflowCluster) ExecutorStsReadyReplicas

func (tc *TiflowCluster) ExecutorStsReadyReplicas() int32

func (*TiflowCluster) ExecutorStsUpdatedReplicas

func (tc *TiflowCluster) ExecutorStsUpdatedReplicas() int32

func (*TiflowCluster) ExecutorUpgrading

func (tc *TiflowCluster) ExecutorUpgrading() bool

func (*TiflowCluster) GetClusterConditions

func (tc *TiflowCluster) GetClusterConditions() []TiflowClusterCondition

func (*TiflowCluster) GetClusterPhase

func (tc *TiflowCluster) GetClusterPhase() TiflowClusterPhaseType

func (*TiflowCluster) GetClusterStatus

func (tc *TiflowCluster) GetClusterStatus() *TiflowClusterStatus

func (*TiflowCluster) GetExecutorPhase

func (tc *TiflowCluster) GetExecutorPhase() ExecutorPhaseType

func (*TiflowCluster) GetExecutorStatus

func (tc *TiflowCluster) GetExecutorStatus() *ExecutorStatus

func (*TiflowCluster) GetExecutorSyncTypes

func (tc *TiflowCluster) GetExecutorSyncTypes() []ClusterSyncType

func (*TiflowCluster) GetInstanceName

func (tc *TiflowCluster) GetInstanceName() string

func (*TiflowCluster) GetMasterPhase

func (tc *TiflowCluster) GetMasterPhase() MasterPhaseType

func (*TiflowCluster) GetMasterStatus

func (tc *TiflowCluster) GetMasterStatus() *MasterStatus

func (*TiflowCluster) GetMasterSyncTypes

func (tc *TiflowCluster) GetMasterSyncTypes() []ClusterSyncType

func (*TiflowCluster) Heterogeneous

func (tc *TiflowCluster) Heterogeneous() bool

func (*TiflowCluster) IsClusterTLSEnabled

func (tc *TiflowCluster) IsClusterTLSEnabled() bool

func (*TiflowCluster) MasterActualMembers

func (tc *TiflowCluster) MasterActualMembers() int32

func (*TiflowCluster) MasterActualPeerMembers

func (tc *TiflowCluster) MasterActualPeerMembers() int32

func (*TiflowCluster) MasterAllMembers

func (tc *TiflowCluster) MasterAllMembers() int32

func (*TiflowCluster) MasterImage

func (tc *TiflowCluster) MasterImage() string

func (*TiflowCluster) MasterIsAvailable

func (tc *TiflowCluster) MasterIsAvailable() bool

func (*TiflowCluster) MasterScaling

func (tc *TiflowCluster) MasterScaling() bool

func (*TiflowCluster) MasterStsActualReplicas

func (tc *TiflowCluster) MasterStsActualReplicas() int32

func (*TiflowCluster) MasterStsCurrentReplicas

func (tc *TiflowCluster) MasterStsCurrentReplicas() int32

func (*TiflowCluster) MasterStsDesiredReplicas

func (tc *TiflowCluster) MasterStsDesiredReplicas() int32

func (*TiflowCluster) MasterStsReadyReplicas

func (tc *TiflowCluster) MasterStsReadyReplicas() int32

func (*TiflowCluster) MasterStsUpdatedReplicas

func (tc *TiflowCluster) MasterStsUpdatedReplicas() int32

func (*TiflowCluster) MasterUpgrading

func (tc *TiflowCluster) MasterUpgrading() bool

func (*TiflowCluster) Scheme

func (tc *TiflowCluster) Scheme() string

func (*TiflowCluster) WithoutLocalExecutor

func (tc *TiflowCluster) WithoutLocalExecutor() bool

func (*TiflowCluster) WithoutLocalMaster

func (tc *TiflowCluster) WithoutLocalMaster() bool

type TiflowClusterCondition

type TiflowClusterCondition struct {
	// Type of the condition.
	Type TiflowClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status metav1.ConditionStatus `json:"status"`
	// LastTransitionTime means last time the condition transitioned from one status to another.
	// +nullable
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

TiflowClusterCondition is tiflow cluster condition

func (*TiflowClusterCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiflowClusterCondition.

func (*TiflowClusterCondition) DeepCopyInto

func (in *TiflowClusterCondition) DeepCopyInto(out *TiflowClusterCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TiflowClusterConditionType

type TiflowClusterConditionType string

TiflowClusterConditionType type alias

const (
	VersionChecked TiflowClusterConditionType = "VersionChecked"
	LeaderChecked  TiflowClusterConditionType = "LeaderChecked"

	MastersInfoUpdatedChecked TiflowClusterConditionType = "MastersInfoUpdatedChecked"
	MasterVersionChecked      TiflowClusterConditionType = "MasterVersionChecked"
	MasterReplicaChecked      TiflowClusterConditionType = "MasterReplicaChecked"
	MasterReadyChecked        TiflowClusterConditionType = "MasterReadyChecked"
	MasterMembersChecked      TiflowClusterConditionType = "MasterMembersChecked"
	MasterSyncChecked         TiflowClusterConditionType = "MasterSyncChecked"

	ExecutorsInfoUpdatedChecked TiflowClusterConditionType = "ExecutorsInfoUpdatedCheck"
	ExecutorVersionChecked      TiflowClusterConditionType = "ExecutorVersionChecked"
	ExecutorReplicaChecked      TiflowClusterConditionType = "ExecutorReplicaChecked"
	ExecutorReadyChecked        TiflowClusterConditionType = "ExecutorReadyChecked"
	ExecutorPVCChecked          TiflowClusterConditionType = "ExecutorPVCChecked"
	ExecutorMembersChecked      TiflowClusterConditionType = "ExecutorMembersChecked"
	ExecutorSyncChecked         TiflowClusterConditionType = "ExecutorSyncChecked"
)

type TiflowClusterList

type TiflowClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []TiflowCluster `json:"items"`
}

TiflowClusterList contains a list of TiflowCluster

func (*TiflowClusterList) DeepCopy

func (in *TiflowClusterList) DeepCopy() *TiflowClusterList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiflowClusterList.

func (*TiflowClusterList) DeepCopyInto

func (in *TiflowClusterList) DeepCopyInto(out *TiflowClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TiflowClusterList) DeepCopyObject

func (in *TiflowClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TiflowClusterPhaseType

type TiflowClusterPhaseType string

TiflowClusterPhaseType type alias

const (
	// ClusterStarting indicates the state of operator is starting
	ClusterStarting TiflowClusterPhaseType = "Starting"
	// ClusterReconciling indicates the state of operator is reconciling
	ClusterReconciling TiflowClusterPhaseType = "Reconciling"
	// ClusterRunning indicates the state of operator is completed
	ClusterRunning TiflowClusterPhaseType = "Running"
	// ClusterUnknown indicates the state of operator is unknown
	ClusterUnknown TiflowClusterPhaseType = "Unknown"
	// ClusterFailed indicates the state of operator is failed
	ClusterFailed TiflowClusterPhaseType = "Failed"
)

type TiflowClusterSpec

type TiflowClusterSpec struct {

	// Tiflow-master cluster spec
	// +optional
	Master *MasterSpec `json:"master,omitempty"`

	// Tiflow-executor cluster spec
	// +optional
	Executor *ExecutorSpec `json:"executor,omitempty"`

	// Tiflow-cluster version
	// +optional
	Version string `json:"version"`

	// ImagePullPolicy of Tiflow cluster Pods
	// +kubebuilder:default=IfNotPresent
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// ConfigUpdateStrategy determines how the configuration change is applied to the cluster.
	// UpdateStrategyInPlace will update the ConfigMap of configuration in-place and an extra rolling-update of the
	// cluster component is needed to reload the configuration change.
	// UpdateStrategyRollingUpdate will create a new ConfigMap with the new configuration and rolling-update the
	// related components to use the new ConfigMap, that is, the new configuration will be applied automatically.
	ConfigUpdateStrategy ConfigUpdateStrategy `json:"configUpdateStrategy,omitempty"`

	// Whether enable the TLS connection between Tiflow components
	// Optional: Defaults to nil
	// +optional
	TLSCluster *bool `json:"tlsCluster,omitempty"`

	// Whether Hostnetwork is enabled for Tiflow cluster Pods
	// Optional: Defaults to false
	// +optional
	HostNetwork *bool `json:"hostNetwork,omitempty"`

	// Affinity of Tiflow cluster Pods
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// PriorityClassName of Tiflow cluster Pods
	// Optional: Defaults to omitted
	// +optional
	PriorityClassName *string `json:"priorityClassName,omitempty"`

	// Base node selectors of Tiflow cluster Pods, components may add or override selectors upon this respectively
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Additional annotations for the dm cluster
	// Can be overrode by annotations in master spec or executor spec
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// Additional labels for the tiflow cluster
	// Can be overrode by labels in master spec or executor spec
	// +optional
	Labels map[string]string `json:"labels,omitempty"`

	// Base tolerations of Tiflow cluster Pods, components may add more tolerations upon this respectively
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// DNSConfig Specifies the DNS parameters of a pod.
	// +optional
	DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`

	// DNSPolicy Specifies the DNSPolicy parameters of a pod.
	// +optional
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`

	// ClusterDomain is the Kubernetes Cluster Domain of Tiflow cluster
	// Optional: Defaults to ""
	// +optional
	ClusterDomain string `json:"clusterDomain,omitempty"`

	// Cluster is the external cluster, if configured, the components in this TiflowCluster will join to this configured cluster.
	// +optional
	Cluster *ClusterRef `json:"cluster,omitempty"`

	// PodSecurityContext of the component
	// +optional
	PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`

	// StatefulSetUpdateStrategy of Tiflow cluster StatefulSets
	// +optional
	StatefulSetUpdateStrategy apps.StatefulSetUpdateStrategyType `json:"statefulSetUpdateStrategy,omitempty"`

	// PodManagementPolicy of Tiflow cluster StatefulSets
	// +optional
	PodManagementPolicy apps.PodManagementPolicyType `json:"podManagementPolicy,omitempty"`
}

TiflowClusterSpec defines the desired state of TiflowCluster

func (*TiflowClusterSpec) DeepCopy

func (in *TiflowClusterSpec) DeepCopy() *TiflowClusterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiflowClusterSpec.

func (*TiflowClusterSpec) DeepCopyInto

func (in *TiflowClusterSpec) DeepCopyInto(out *TiflowClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TiflowClusterStatus

type TiflowClusterStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	Master   MasterStatus   `json:"master,omitempty"`
	Executor ExecutorStatus `json:"executor,omitempty"`
	// ClusterConditions list of conditions representing the current status of the tiflow engine resource
	// Interact between Master and Executor, and will update each other
	// +optional
	// +nullable
	ClusterConditions []TiflowClusterCondition `json:"clusterConditions,omitempty"`
	// ClusterPhase represents the observed state of a tiflow cluster
	// Update by master's phase and executor's phase
	// +required
	ClusterPhase TiflowClusterPhaseType `json:"clusterPhase"`
	// (Optional) Message related to the status of the MasterCluster
	// +optional
	Message string `json:"message,omitempty"`
	// LastTransitionTime means last time the ClusterPhase transitioned from one to another
	// +required
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
}

TiflowClusterStatus defines the observed state of TiflowCluster

func (*TiflowClusterStatus) DeepCopy

func (in *TiflowClusterStatus) DeepCopy() *TiflowClusterStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TiflowClusterStatus.

func (*TiflowClusterStatus) DeepCopyInto

func (in *TiflowClusterStatus) DeepCopyInto(out *TiflowClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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