Documentation ¶
Index ¶
- Constants
- Variables
- func AddPumpForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster
- func AddTiCDCForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster
- func AddTiFlashForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster
- func GetBackupCRDWithS3(tc *v1alpha1.TidbCluster, fromSecretName, brType string, ...) *v1alpha1.Backup
- func GetBackupRole(tc *v1alpha1.TidbCluster, serviceAccountName string) *rbacv1beta1.Role
- func GetBackupRoleBinding(tc *v1alpha1.TidbCluster, serviceAccountName string) *rbacv1beta1.RoleBinding
- func GetBackupSecret(tc *v1alpha1.TidbCluster, password string) *corev1.Secret
- func GetBackupServiceAccount(tc *v1alpha1.TidbCluster, serviceAccountName string) *corev1.ServiceAccount
- func GetDMCluster(ns, name, version string) *v1alpha1.DMCluster
- func GetInitializerSecret(tc *v1alpha1.TidbCluster, initPassWDName, password string) *corev1.Secret
- func GetRestoreCRDWithS3(tc *v1alpha1.TidbCluster, toSecretName, restoreType string, ...) *v1alpha1.Restore
- func GetS3Secret(namespace, accessKey, secretKey string) *corev1.Secret
- func GetTidbCluster(ns, name, version string) *v1alpha1.TidbCluster
- func GetTidbClusterAutoScaler(name, ns string, tc *v1alpha1.TidbCluster, tm *v1alpha1.TidbMonitor) *v1alpha1.TidbClusterAutoScaler
- func GetTidbInitializer(ns, tcName, initName, initPassWDName, initTLSName string) *v1alpha1.TidbInitializer
- func GetTidbNGMonitoring(ns, name string, tc *v1alpha1.TidbCluster) *v1alpha1.TidbNGMonitoring
- func NewTidbMonitor(name, namespace string, tc *v1alpha1.TidbCluster, grafanaEnabled, persist bool, ...) *v1alpha1.TidbMonitor
- func UpdateTidbMonitorForDM(tm *v1alpha1.TidbMonitor, dc *v1alpha1.DMCluster)
- func WithStorage(r corev1.ResourceRequirements, size string) corev1.ResourceRequirements
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
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 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 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)
func WithStorage ¶
func WithStorage(r corev1.ResourceRequirements, size string) corev1.ResourceRequirements
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.