v1alpha1

package
v2.0.0-...-cde7f8a Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Support modify volume by VolumeAttributeClass
	VolumeAttributeClass      Feature      = "VolumeAttributeClass"
	VolumeAttributeClassStage FeatureStage = FeatureStageAlpha
)
View Source
const (
	// KeyPrefix defines key prefix of well known labels and annotations
	KeyPrefix = "pingcap.com/"

	// LabelKeyManagedBy means resources are managed by tidb operator
	LabelKeyManagedBy = KeyPrefix + "managed-by"
)

fixme(ideascf): it's copied from tidb-operator/api/core/v1alpha1/common_types.go

View Source
const (
	// ComponentLabelKey is Kubernetes recommended label key, it represents the component within the architecture
	ComponentLabelKey string = "app.kubernetes.io/component"
	// NameLabelKey is Kubernetes recommended label key, it represents the name of the application
	NameLabelKey string = "app.kubernetes.io/name"
	// InstanceLabelKey is Kubernetes recommended label key, it represents a unique name identifying the instance of an application
	// It's set by helm when installing a release
	InstanceLabelKey string = "app.kubernetes.io/instance"

	// BackupLabelKey is backup key
	BackupLabelKey string = "tidb.pingcap.com/backup"
	// RestoreLabelKey is restore key
	RestoreLabelKey string = "tidb.pingcap.com/restore"
	// BackupScheduleLabelKey is backup schedule key
	BackupScheduleLabelKey string = "tidb.pingcap.com/backup-schedule"

	// CleanJobLabelVal is clean job label value
	CleanJobLabelVal string = "clean"
	// RestoreJobLabelVal is restore job label value
	RestoreJobLabelVal string = "restore"
	// RestoreWarmUpJobLabelVal is restore warmup job label value
	RestoreWarmUpJobLabelVal string = "warmup"
	// BackupJobLabelVal is backup job label value
	BackupJobLabelVal string = "backup"
	// BackupScheduleJobLabelVal is backup schedule job label value
	BackupScheduleJobLabelVal string = "backup-schedule"
)
View Source
const (
	// NamePrefix for "names" in k8s resources
	// Users may overlay some fields in managed resource such as pods. Names with this
	// prefix is preserved to avoid conflicts with fields defined by users.
	NamePrefix = "ti-"

	// VolNamePrefix is defined for custom persistent volume which may have name conflicts
	// with the volumes managed by tidb operator
	VolNamePrefix = NamePrefix + "vol-"
)
View Source
const (
	// Finalizer is the finalizer used by all resources managed by TiDB Operator.
	Finalizer = "pingcap.com/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature string

type FeatureGate

type FeatureGate struct {
	Name Feature `json:"name"`
}

type FeatureGateStatus

type FeatureGateStatus struct {
	FeatureGate `json:",inline"`
	Stage       FeatureStage `json:"stage"`
}

type FeatureStage

type FeatureStage string
const (
	FeatureStageAlpha      FeatureStage = "ALPHA"
	FeatureStageBeta       FeatureStage = "BETA"
	FeatureStageStable     FeatureStage = "STABLE"
	FeatureStageDeprecated FeatureStage = "DEPRECATED"
)

type Label

type Label map[string]string

Label is the label field in metadata

func NewBackup

func NewBackup() Label

NewBackup initialize a new Label for Jobs of bakcup

func NewBackupSchedule

func NewBackupSchedule() Label

NewBackupSchedule initialize a new Label for backups of backup schedule

func NewRestore

func NewRestore() Label

NewRestore initialize a new Label for Jobs of restore

func (Label) Backup

func (l Label) Backup(val string) Label

Backup assigns specific value to backup key in label

func (Label) BackupJob

func (l Label) BackupJob() Label

BackupJob assigns backup to component key in label

func (Label) BackupSchedule

func (l Label) BackupSchedule(val string) Label

BackupSchedule assigns specific value to backup schedule key in label

func (Label) CleanJob

func (l Label) CleanJob() Label

CleanJob assigns clean to component key in label

func (Label) Component

func (l Label) Component(name string) Label

Component adds component kv pair to label

func (Label) Instance

func (l Label) Instance(name string) Label

Instance adds instance kv pair to label

func (Label) Restore

func (l Label) Restore(val string) Label

Restore assigns specific value to restore key in label

func (Label) RestoreJob

func (l Label) RestoreJob() Label

RestoreJob assigns restore to component key in label

Jump to

Keyboard shortcuts

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