fixture

package
v1.4.5-hotfix-log Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BRType     = "br"
	DumperType = "dumper"
)
View Source
const ClusterCustomKey = "cluster-test-key"

ClusterCustomKey for label and ann to test

View Source
const ComponentCustomKey = "component-test-key"

ComponentCustomKey for label and ann to test

Variables

View Source
var (
	BestEffort     = corev1.ResourceRequirements{}
	BurstableSmall = corev1.ResourceRequirements{

		Requests: corev1.ResourceList{
			corev1.ResourceCPU:    resource.MustParse("100m"),
			corev1.ResourceMemory: resource.MustParse("100Mi"),
		},
		Limits: corev1.ResourceList{
			corev1.ResourceCPU:    resource.MustParse("1000m"),
			corev1.ResourceMemory: resource.MustParse("2Gi"),
		},
	}
	BurstableMedium = corev1.ResourceRequirements{
		Requests: corev1.ResourceList{
			corev1.ResourceCPU:    resource.MustParse("100m"),
			corev1.ResourceMemory: resource.MustParse("100Mi"),
		},
		Limits: corev1.ResourceList{
			corev1.ResourceCPU:    resource.MustParse("2000m"),
			corev1.ResourceMemory: resource.MustParse("4Gi"),
		},
	}
	// hard-coded region and s3 bucket in our aws account for e2e testing
	// TODO create s3 bucket in current region dynamically
	AWSRegion = "us-west-2"
	Bucket    = "backup.e2e.us-west-2.tidbcloud.com"
	S3Secret  = "s3-secret"
)

Functions

func AddPumpForTidbCluster added in v1.1.1

func AddPumpForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster

func AddTiCDCForTidbCluster added in v1.2.0

func AddTiCDCForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster

func AddTiFlashForTidbCluster added in v1.2.0

func AddTiFlashForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster

func GetBackupCRDWithS3 added in v1.1.1

func GetBackupCRDWithS3(tc *v1alpha1.TidbCluster, fromSecretName, brType string, s3config *v1alpha1.S3StorageProvider) *v1alpha1.Backup

func GetBackupRole

func GetBackupRole(tc *v1alpha1.TidbCluster, serviceAccountName string) *rbacv1beta1.Role

func GetBackupRoleBinding

func GetBackupRoleBinding(tc *v1alpha1.TidbCluster, serviceAccountName string) *rbacv1beta1.RoleBinding

func GetBackupSecret

func GetBackupSecret(tc *v1alpha1.TidbCluster, password string) *corev1.Secret

func GetBackupServiceAccount

func GetBackupServiceAccount(tc *v1alpha1.TidbCluster, serviceAccountName string) *corev1.ServiceAccount

func GetDMCluster added in v1.2.0

func GetDMCluster(ns, name, version string) *v1alpha1.DMCluster

GetDMCluster returns a DmCluster resource configured for testing.

func GetInitializerSecret

func GetInitializerSecret(tc *v1alpha1.TidbCluster, initPassWDName, password string) *corev1.Secret

func GetRestoreCRDWithS3 added in v1.1.1

func GetRestoreCRDWithS3(tc *v1alpha1.TidbCluster, toSecretName, restoreType string, s3config *v1alpha1.S3StorageProvider) *v1alpha1.Restore

func GetS3Secret

func GetS3Secret(namespace, accessKey, secretKey string) *corev1.Secret

func GetTidbCluster

func GetTidbCluster(ns, name, version string) *v1alpha1.TidbCluster

GetTidbCluster returns a TidbCluster resource configured for testing

func GetTidbClusterAutoScaler

func GetTidbClusterAutoScaler(name, ns string, tc *v1alpha1.TidbCluster, tm *v1alpha1.TidbMonitor) *v1alpha1.TidbClusterAutoScaler

func GetTidbDashboard added in v1.4.0

func GetTidbDashboard(ns, name string, tc *v1alpha1.TidbCluster) *v1alpha1.TidbDashboard

func GetTidbInitializer

func GetTidbInitializer(ns, tcName, initName, initPassWDName, initTLSName string) *v1alpha1.TidbInitializer

func GetTidbNGMonitoring added in v1.3.0

func GetTidbNGMonitoring(ns, name string, tc *v1alpha1.TidbCluster) *v1alpha1.TidbNGMonitoring

func NewTidbMonitor

func NewTidbMonitor(name, namespace string, tc *v1alpha1.TidbCluster, grafanaEnabled, persist bool, isRetain bool) *v1alpha1.TidbMonitor

func UpdateTidbMonitorForDM added in v1.2.0

func UpdateTidbMonitorForDM(tm *v1alpha1.TidbMonitor, dc *v1alpha1.DMCluster)

Types

This section is empty.

Jump to

Keyboard shortcuts

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