Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDMData(fw portforward.PortForward, ns string, sourceCount int) error
- func CheckDMDataWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL, nsTiDB, tcName string, ...) error
- func CheckDMMySQLReady(fw portforward.PortForward, ns string) error
- func CheckDMMySQLReadyWithTLSEnabled(fw portforward.PortForward, ns string, secret *corev1.Secret) error
- func CheckThanosQueryData(name, namespace string, fw portforward.PortForward, expectNumber int) error
- func CheckTidbMonitor(monitor *v1alpha1.TidbMonitor, cli versioned.Interface, ...) error
- func CheckTidbMonitorConfigurationUpdate(monitor *v1alpha1.TidbMonitor, kubeCli kubernetes.Interface, ...) error
- func CleanDMMySQL(kubeCli kubernetes.Interface, ns string) error
- func CleanDMTiDB(cli *versioned.Clientset, kubeCli kubernetes.Interface) error
- func CleanNodeLabels(c kubernetes.Interface) error
- func CleanOperator(info *OperatorConfig) error
- func CreateDMSources(fw portforward.PortForward, ns, masterSvcName string) error
- func DMTaskName(name string) string
- func DeployDMMySQL(kubeCli kubernetes.Interface, ns string) error
- func DeployDMMySQLWithTLSEnabled(kubeCli kubernetes.Interface, namespace, tlsSecret string) error
- func DumpPod(logPath string, pod *corev1.Pod) error
- func GenDMFullData(fw portforward.PortForward, ns string) error
- func GenDMFullDataWithMySQLNamespace(fw portforward.PortForward, nsDM, nsMySQL string) error
- func GenDMFullDataWithMySQLNamespaceWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL string, secret *corev1.Secret) error
- func GenDMIncrData(fw portforward.PortForward, ns string) error
- func GenDMIncrDataWithMySQLNamespace(fw portforward.PortForward, nsDM, nsMySQL string) error
- func GenDMIncrDataWithMySQLNamespaceWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL string, secret *corev1.Secret) error
- func GetDMMasters(fw portforward.PortForward, ns, masterSvcName string) ([]*dmapi.MastersInfo, error)
- func GetDMOpenAPISpec(fw portforward.PortForward, ns, masterSvcName, taskConf, errSubStr string) error
- func GetDMWorkers(fw portforward.PortForward, ns, masterSvcName string) ([]*dmapi.WorkersInfo, error)
- func GetDrainerSubValuesOrDie(info *DrainerConfig) string
- func GetSecretListerWithCacheSynced(c kubernetes.Interface, resync time.Duration) corelisterv1.SecretLister
- func QueryDMStatus(fw portforward.PortForward, ns, masterSvcName string) (string, error)
- func ShowDMSource(fw portforward.PortForward, ns, masterSvcName string) (string, error)
- func StartDMTask(fw portforward.PortForward, ns, masterSvcName, taskConf, errSubStr string) error
- type Config
- func (c *Config) CleanTempDirs() error
- func (c *Config) GetTiDBVersion() (string, error)
- func (c *Config) GetTiDBVersionOrDie() string
- func (c *Config) GetUpgradeTidbVersions() []string
- func (c *Config) GetUpgradeTidbVersionsOrDie() []string
- func (c *Config) MustPrettyPrintJSON() string
- func (c *Config) Parse() error
- func (c *Config) PrettyPrintJSON() (string, error)
- type CrdTestUtil
- func (ctu *CrdTestUtil) CheckDisasterTolerance(cluster *v1alpha1.TidbCluster) error
- func (ctu *CrdTestUtil) CheckDisasterToleranceOrDie(tc *v1alpha1.TidbCluster)
- func (ctu *CrdTestUtil) CleanResourcesOrDie(resource, namespace string)
- func (ctu *CrdTestUtil) CreateSecretOrDie(secret *corev1.Secret)
- func (ctu *CrdTestUtil) CreateTidbClusterOrDie(tc *v1alpha1.TidbCluster)
- func (ctu *CrdTestUtil) DeleteTidbClusterOrDie(tc *v1alpha1.TidbCluster)
- func (ctu *CrdTestUtil) GetTidbClusterOrDie(name, namespace string) *v1alpha1.TidbCluster
- func (ctu *CrdTestUtil) UpdateTidbClusterOrDie(tc *v1alpha1.TidbCluster)
- func (ctu *CrdTestUtil) WaitForTidbClusterReady(tc *v1alpha1.TidbCluster, timeout, pollInterval time.Duration) error
- func (ctu *CrdTestUtil) WaitTidbClusterReadyOrDie(tc *v1alpha1.TidbCluster, timeout time.Duration)
- type DbType
- type DrainerConfig
- type DrainerSourceConfig
- type FaultTriggerActions
- type Node
- type Nodes
- type OperatorActions
- func (oa *OperatorActions) CheckDrainer(info *DrainerConfig, source *DrainerSourceConfig) error
- func (oa *OperatorActions) CleanCRDOrDie()
- func (oa *OperatorActions) CleanOperatorOrDie(info *OperatorConfig)
- func (oa *OperatorActions) CreateCRDOrDie(info *OperatorConfig)
- func (oa *OperatorActions) CreateReleasedCRDOrDie(version string)
- func (oa *OperatorActions) DeployDMMySQLOrDie(ns string)
- func (oa *OperatorActions) DeployDMTiDBOrDie()
- func (oa *OperatorActions) DeployDrainer(info *DrainerConfig, source *DrainerSourceConfig) error
- func (oa *OperatorActions) DeployOperator(info *OperatorConfig) error
- func (oa *OperatorActions) DeployOperatorOrDie(info *OperatorConfig)
- func (oa *OperatorActions) IsMembersReady(obj metav1.Object, component v1alpha1.MemberType) error
- func (oa *OperatorActions) LabelNodes() error
- func (oa *OperatorActions) LabelNodesOrDie()
- func (oa *OperatorActions) ReplaceCRDOrDie(info *OperatorConfig)
- func (oa *OperatorActions) RunEventWorker()
- func (oa *OperatorActions) RunKubectlOrDie(args ...string) string
- func (oa *OperatorActions) UpgradeOperator(info *OperatorConfig) error
- func (oa *OperatorActions) UpgradeOperatorOrDie(info *OperatorConfig)
- func (oa *OperatorActions) WaitAdmissionWebhookReady(info *OperatorConfig, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForDmClusterDeleted(ns, dcName string, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForDmClusterReady(dc *v1alpha1.DMCluster, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForTiDBDashboardReady(td *v1alpha1.TidbDashboard, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForTiDBNGMonitoringReady(tngm *v1alpha1.TidbNGMonitoring, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForTidbClusterInitRandomPassword(tc *v1alpha1.TidbCluster, fw portforward.PortForward, ...) error
- func (oa *OperatorActions) WaitForTidbClusterReady(tc *v1alpha1.TidbCluster, timeout, pollInterval time.Duration) error
- func (oa *OperatorActions) WaitForTidbComponentsReady(tc *v1alpha1.TidbCluster, componentsFilter map[v1alpha1.MemberType]struct{}, ...) error
- type OperatorConfig
- type RegionInfo
- type RegionsInfo
Constants ¶
const ( DefaultPollTimeout time.Duration = 5 * time.Minute DefaultPollInterval time.Duration = 5 * time.Second BackupAndRestorePollTimeOut time.Duration = 10 * time.Minute )
const ( // DMLabelName is the label value for `app.kubernetes.io/name`. DMLabelName = "dm-e2e" // DMMySQLNamespace is the namespace used to install upstream MySQL instances for DM E2E tests. DMMySQLNamespace = "dm-mysql" // DMMySQLSvcStsName is the upstream MySQL svc/sts name for DM E2E tests. DMMySQLSvcStsName = "dm-mysql" // DMMySQLImage is the upstream MySQL container image for DM E2E tests. DMMySQLImage = "mysql:8.0" // DMMySQLReplicas is the upstream MySQL instance number for DM E2E tests. // We use replicas as different MySQL instances. DMMySQLReplicas int32 = 2 // DMMySQLPort is the upstream MySQL instance's service port. DMMySQLPort int32 = 3306 // DMMySQLStorage is the request storage used by one MySQL instance. DMMySQLStorage = "2Gi" // DMMySQLServerTLSPath is the path to mount the MySQL server TLS certs. DMMySQLServerTLSPath = "/var/lib/server-tls" // DMTiDBNamespace is the namespace used to install the downstream TiDB cluster for DM E2E tests. DMTiDBNamespace = "dm-tidb" // DMTiDBName is the name of the TiDB cluster for DM E2E tests. DMTiDBName = "dm-tidb" )
const ( DrainerReplicas int32 = 1 DbTypeMySQL DbType = "mysql" DbTypeFile DbType = "file" DbTypeTiDB DbType = "tidb" )
const ( RackLabel = "rack" RackNum = 3 LabelKeyTestingZone = "testing.pingcap.com/zone" )
const ( PodPollInterval = 2 * time.Second // PodTimeout is how long to wait for the pod to be started or // terminated. PodTimeout = 5 * time.Minute )
Variables ¶
var ( DMSources = []string{` source-id: "replica-01" enable-gtid: true relay-dir: /var/lib/dm-worker/relay from: host: "dm-mysql-0.dm-mysql.dm-mysql" user: "root" password: "" port: 3306 `, ` source-id: "replica-02" enable-gtid: true relay-dir: /var/lib/dm-worker/relay from: host: "dm-mysql-1.dm-mysql.dm-mysql" user: "root" password: "" port: 3306 `} DMSingleTask = `` /* 471-byte string literal not displayed */ DMShardTask = `` /* 592-byte string literal not displayed */ )
Functions ¶
func CheckDMData ¶ added in v1.2.0
func CheckDMData(fw portforward.PortForward, ns string, sourceCount int) error
CheckDMData checks data between downstream TiDB cluster and upstream MySQL are equal. NOTE: for simplicity, we only check rows count now.
func CheckDMDataWithTLSEnabled ¶ added in v1.2.0
func CheckDMDataWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL, nsTiDB, tcName string, sourceCount int, upSecret, downSecret *corev1.Secret) error
CheckDMDataWithTLSEnabled checks data between downstream TiDB cluster and upstream MySQL are equal with TLS enabled. NOTE: for simplicity, we only check rows count now.
func CheckDMMySQLReady ¶ added in v1.2.0
func CheckDMMySQLReady(fw portforward.PortForward, ns string) error
CheckDMMySQLReady checks whether all upstream MySQL instances are ready.
func CheckDMMySQLReadyWithTLSEnabled ¶ added in v1.2.0
func CheckDMMySQLReadyWithTLSEnabled(fw portforward.PortForward, ns string, secret *corev1.Secret) error
CheckDMMySQLReadyWithTLSEnabled checks whether all upstream MySQL instances are ready with TLS enabled.
func CheckThanosQueryData ¶ added in v1.4.0
func CheckThanosQueryData(name, namespace string, fw portforward.PortForward, expectNumber int) error
CheckThanosQueryData check the Thanos Query working status by querying `up` api and `targets` api.
func CheckTidbMonitor ¶ added in v1.1.0
func CheckTidbMonitor(monitor *v1alpha1.TidbMonitor, cli versioned.Interface, kubeCli kubernetes.Interface, fw portforward.PortForward) error
func CheckTidbMonitorConfigurationUpdate ¶ added in v1.2.2
func CheckTidbMonitorConfigurationUpdate(monitor *v1alpha1.TidbMonitor, kubeCli kubernetes.Interface, fw portforward.PortForward, expectActiveTargets int) error
func CleanDMMySQL ¶ added in v1.2.0
func CleanDMMySQL(kubeCli kubernetes.Interface, ns string) error
CleanDMMySQL cleans upstream MySQL instances for DM E2E tests.
func CleanDMTiDB ¶ added in v1.2.0
func CleanDMTiDB(cli *versioned.Clientset, kubeCli kubernetes.Interface) error
CleanDMTiDB cleans the downstream TiDB cluster for DM E2E tests.
func CleanNodeLabels ¶ added in v1.2.0
func CleanNodeLabels(c kubernetes.Interface) error
func CleanOperator ¶ added in v1.2.0
func CleanOperator(info *OperatorConfig) error
func CreateDMSources ¶ added in v1.2.0
func CreateDMSources(fw portforward.PortForward, ns, masterSvcName string) error
CreateDMSources creates upstream MySQL sources into DM cluster.
func DMTaskName ¶ added in v1.4.0
func DeployDMMySQL ¶ added in v1.2.0
func DeployDMMySQL(kubeCli kubernetes.Interface, ns string) error
DeployDMMySQL deploy upstream MySQL instances for DM E2E tests.
func DeployDMMySQLWithTLSEnabled ¶ added in v1.2.0
func DeployDMMySQLWithTLSEnabled(kubeCli kubernetes.Interface, namespace, tlsSecret string) error
DeployDMMySQLWithTLSEnabled deploy upstream MySQL instances for DM E2E tests and with TLS enabled.
func GenDMFullData ¶ added in v1.2.0
func GenDMFullData(fw portforward.PortForward, ns string) error
GenDMFullData generates full stage data for upstream MySQL.
func GenDMFullDataWithMySQLNamespace ¶ added in v1.2.0
func GenDMFullDataWithMySQLNamespace(fw portforward.PortForward, nsDM, nsMySQL string) error
GenDMFullDataWithMySQLNamespace generates full stage data for upstream MySQL in the specified namespace.
func GenDMFullDataWithMySQLNamespaceWithTLSEnabled ¶ added in v1.2.0
func GenDMFullDataWithMySQLNamespaceWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL string, secret *corev1.Secret) error
GenDMFullDataWithMySQLNamespaceWithTLSEnabled generates full stage data for upstream MySQL in the specified namespace with DLS enabled.
func GenDMIncrData ¶ added in v1.2.0
func GenDMIncrData(fw portforward.PortForward, ns string) error
GenDMIncrData generates incremental stage data for upstream MySQL. NOTE: we can generate incremental data multiple times if needed later.
func GenDMIncrDataWithMySQLNamespace ¶ added in v1.2.0
func GenDMIncrDataWithMySQLNamespace(fw portforward.PortForward, nsDM, nsMySQL string) error
GenDMIncrDataWithMySQLNamespace generates incremental stage data for upstream MySQL in the specified namespace. NOTE: we can generate incremental data multiple times if needed later.
func GenDMIncrDataWithMySQLNamespaceWithTLSEnabled ¶ added in v1.2.0
func GenDMIncrDataWithMySQLNamespaceWithTLSEnabled(fw portforward.PortForward, nsDM, nsMySQL string, secret *corev1.Secret) error
GenDMIncrDataWithMySQLNamespaceWithTLSEnabled generates incremental stage data for upstream MySQL in the specified namespace with TLS enabled. NOTE: we can generate incremental data multiple times if needed later.
func GetDMMasters ¶ added in v1.2.0
func GetDMMasters(fw portforward.PortForward, ns, masterSvcName string) ([]*dmapi.MastersInfo, error)
GetDMMasters gets all DM-master members info.
func GetDMOpenAPISpec ¶ added in v1.3.0
func GetDMOpenAPISpec(fw portforward.PortForward, ns, masterSvcName, taskConf, errSubStr string) error
GetDMOpenAPISpec get openapi Spec from dm-master pod.
func GetDMWorkers ¶ added in v1.2.0
func GetDMWorkers(fw portforward.PortForward, ns, masterSvcName string) ([]*dmapi.WorkersInfo, error)
GetDMWorkers gets all DM-worker members info.
func GetDrainerSubValuesOrDie ¶ added in v1.1.0
func GetDrainerSubValuesOrDie(info *DrainerConfig) string
func GetSecretListerWithCacheSynced ¶ added in v1.3.0
func GetSecretListerWithCacheSynced(c kubernetes.Interface, resync time.Duration) corelisterv1.SecretLister
GetSecretListerWithCacheSynced return SecretLister with cache synced
func QueryDMStatus ¶ added in v1.2.0
func QueryDMStatus(fw portforward.PortForward, ns, masterSvcName string) (string, error)
QueryDMStatus queries the status of DM data migration tasks.
func ShowDMSource ¶ added in v1.2.0
func ShowDMSource(fw portforward.PortForward, ns, masterSvcName string) (string, error)
ShowDMSource shows the status of DM MySQL sources.
func StartDMTask ¶ added in v1.2.0
func StartDMTask(fw portforward.PortForward, ns, masterSvcName, taskConf, errSubStr string) error
StartDMTask starts a DM migration task with a task config. if `errSubStr` specified and DM cluster response message contain `errSubStr`, nil will returned for this method.
Types ¶
type Config ¶
type Config struct { TidbVersions string `yaml:"tidb_versions" json:"tidb_versions"` InstallOperator bool `yaml:"install_opeartor" json:"install_opeartor"` InstallDMMysql bool `yaml:"install_dm_mysql" json:"install_dm_mysql"` OperatorTag string `yaml:"operator_tag" json:"operator_tag"` OperatorImage string `yaml:"operator_image" json:"operator_image"` BackupImage string `yaml:"backup_image" json:"backup_image"` OperatorFeatures map[string]bool `yaml:"operator_features" json:"operator_features"` UpgradeOperatorTag string `yaml:"upgrade_operator_tag" json:"upgrade_operator_tag"` UpgradeOperatorImage string `yaml:"upgrade_operator_image" json:"upgrade_operator_image"` LogDir string `yaml:"log_dir" json:"log_dir"` FaultTriggerPort int `yaml:"fault_trigger_port" json:"fault_trigger_port"` Nodes []Nodes `yaml:"nodes" json:"nodes"` ETCDs []Nodes `yaml:"etcds" json:"etcds"` APIServers []Nodes `yaml:"apiservers" json:"apiservers"` CertFile string KeyFile string PDMaxReplicas int `yaml:"pd_max_replicas" json:"pd_max_replicas"` TiKVGrpcConcurrency int `yaml:"tikv_grpc_concurrency" json:"tikv_grpc_concurrency"` TiDBTokenLimit int `yaml:"tidb_token_limit" json:"tidb_token_limit"` // old versions of reparo does not support idempotent incremental recover, so we lock the version explicitly AdditionalDrainerVersion string `yaml:"file_drainer_version" json:"file_drainer_version"` // Block writer BlockWriter blockwriter.Config `yaml:"block_writer,omitempty"` // For local test OperatorRepoUrl string `yaml:"operator_repo_url" json:"operator_repo_url"` OperatorRepoDir string `yaml:"operator_repo_dir" json:"operator_repo_dir"` // chart dir ChartDir string `yaml:"chart_dir" json:"chart_dir"` // manifest dir ManifestDir string `yaml:"manifest_dir" json:"manifest_dir"` E2EImage string `yaml:"e2e_image" json:"e2e_image"` PreloadImages bool `yaml:"preload_images" json:"preload_images"` OperatorKiller utiloperator.OperatorKillerConfig // contains filtered or unexported fields }
Config defines the config of operator tests
func NewDefaultConfig ¶ added in v1.1.0
func NewDefaultConfig() *Config
NewDefaultConfig creates a default configuration.
func ParseConfigOrDie ¶
func ParseConfigOrDie() *Config
func (*Config) CleanTempDirs ¶
func (*Config) GetTiDBVersion ¶
func (*Config) GetTiDBVersionOrDie ¶
func (*Config) GetUpgradeTidbVersions ¶
func (*Config) GetUpgradeTidbVersionsOrDie ¶
func (*Config) MustPrettyPrintJSON ¶ added in v1.1.0
func (*Config) PrettyPrintJSON ¶ added in v1.1.0
type CrdTestUtil ¶ added in v1.1.1
type CrdTestUtil struct {
// contains filtered or unexported fields
}
func NewCrdTestUtil ¶ added in v1.1.1
func NewCrdTestUtil(cli versioned.Interface, kubeCli kubernetes.Interface, asCli asclientset.Interface, stsGetter typedappsv1.StatefulSetsGetter) *CrdTestUtil
func (*CrdTestUtil) CheckDisasterTolerance ¶ added in v1.1.1
func (ctu *CrdTestUtil) CheckDisasterTolerance(cluster *v1alpha1.TidbCluster) error
func (*CrdTestUtil) CheckDisasterToleranceOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) CheckDisasterToleranceOrDie(tc *v1alpha1.TidbCluster)
func (*CrdTestUtil) CleanResourcesOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) CleanResourcesOrDie(resource, namespace string)
func (*CrdTestUtil) CreateSecretOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) CreateSecretOrDie(secret *corev1.Secret)
func (*CrdTestUtil) CreateTidbClusterOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) CreateTidbClusterOrDie(tc *v1alpha1.TidbCluster)
func (*CrdTestUtil) DeleteTidbClusterOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) DeleteTidbClusterOrDie(tc *v1alpha1.TidbCluster)
func (*CrdTestUtil) GetTidbClusterOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) GetTidbClusterOrDie(name, namespace string) *v1alpha1.TidbCluster
func (*CrdTestUtil) UpdateTidbClusterOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) UpdateTidbClusterOrDie(tc *v1alpha1.TidbCluster)
func (*CrdTestUtil) WaitForTidbClusterReady ¶ added in v1.1.1
func (ctu *CrdTestUtil) WaitForTidbClusterReady(tc *v1alpha1.TidbCluster, timeout, pollInterval time.Duration) error
WaitForTidbClusterReady waits for tidb components ready, or timeout
func (*CrdTestUtil) WaitTidbClusterReadyOrDie ¶ added in v1.1.1
func (ctu *CrdTestUtil) WaitTidbClusterReadyOrDie(tc *v1alpha1.TidbCluster, timeout time.Duration)
type DrainerConfig ¶ added in v1.1.0
type DrainerConfig struct { DrainerName string InitialCommitTs string OperatorTag string SourceClusterName string Namespace string DbType DbType Host string User string Password string // use string type in case of empty port (db-type=file) Port string TLSCluster bool }
func (*DrainerConfig) BuildSubValues ¶ added in v1.1.0
func (d *DrainerConfig) BuildSubValues(dir string) (string, error)
func (*DrainerConfig) DrainerHelmString ¶ added in v1.1.0
func (d *DrainerConfig) DrainerHelmString(m map[string]string, source *DrainerSourceConfig) string
type DrainerSourceConfig ¶ added in v1.4.0
type FaultTriggerActions ¶
type FaultTriggerActions interface { CheckAndRecoverEnv() error CheckAndRecoverEnvOrDie() StopNode() (string, string, time.Time, error) StopNodeOrDie() (string, string, time.Time) StartNode(physicalNode string, node string) error StartNodeOrDie(physicalNode string, node string) StopETCD(nodes ...string) error StopETCDOrDie(nodes ...string) StartETCD(nodes ...string) error StartETCDOrDie(nodes ...string) StopKubelet(nodes ...string) error StopKubeletOrDie(nodes ...string) StartKubelet(nodes ...string) error StartKubeletOrDie(nodes ...string) StopKubeAPIServer(node string) error StopKubeAPIServerOrDie(node string) StartKubeAPIServer(node string) error StartKubeAPIServerOrDie(node string) StopKubeControllerManager(node string) error StopKubeControllerManagerOrDie(node string) StartKubeControllerManager(node string) error StartKubeControllerManagerOrDie(node string) StartKubeScheduler(node string) error StartKubeSchedulerOrDie(node string) StopKubeScheduler(node string) error StopKubeSchedulerOrDie(node string) StopKubeProxy() error StopKubeProxyOrDie() StartKubeProxy() error StartKubeProxyOrDie() }
func NewFaultTriggerAction ¶
func NewFaultTriggerAction(cli versioned.Interface, kubeCli kubernetes.Interface, secretLister corelisterv1.SecretLister, cfg *Config) FaultTriggerActions
type Nodes ¶
type Nodes struct { PhysicalNode string `yaml:"physical_node" json:"physical_node"` Nodes []Node `yaml:"nodes" json:"nodes"` }
Nodes defines a series of nodes that belong to the same physical node.
type OperatorActions ¶
type OperatorActions struct {
// contains filtered or unexported fields
}
func NewOperatorActions ¶
func NewOperatorActions(cli versioned.Interface, kubeCli kubernetes.Interface, asCli asclientset.Interface, aggrCli aggregatorclientset.Interface, apiExtCli apiextensionsclientset.Interface, pollInterval time.Duration, operatorConfig *OperatorConfig, cfg *Config, fw portforward.PortForward, f *framework.Framework) *OperatorActions
func (*OperatorActions) CheckDrainer ¶ added in v1.1.0
func (oa *OperatorActions) CheckDrainer(info *DrainerConfig, source *DrainerSourceConfig) error
func (*OperatorActions) CleanCRDOrDie ¶ added in v1.0.3
func (oa *OperatorActions) CleanCRDOrDie()
func (*OperatorActions) CleanOperatorOrDie ¶
func (oa *OperatorActions) CleanOperatorOrDie(info *OperatorConfig)
func (*OperatorActions) CreateCRDOrDie ¶ added in v1.3.2
func (oa *OperatorActions) CreateCRDOrDie(info *OperatorConfig)
func (*OperatorActions) CreateReleasedCRDOrDie ¶ added in v1.3.2
func (oa *OperatorActions) CreateReleasedCRDOrDie(version string)
func (*OperatorActions) DeployDMMySQLOrDie ¶ added in v1.2.0
func (oa *OperatorActions) DeployDMMySQLOrDie(ns string)
func (*OperatorActions) DeployDMTiDBOrDie ¶ added in v1.2.0
func (oa *OperatorActions) DeployDMTiDBOrDie()
func (*OperatorActions) DeployDrainer ¶ added in v1.1.0
func (oa *OperatorActions) DeployDrainer(info *DrainerConfig, source *DrainerSourceConfig) error
func (*OperatorActions) DeployOperator ¶
func (oa *OperatorActions) DeployOperator(info *OperatorConfig) error
func (*OperatorActions) DeployOperatorOrDie ¶
func (oa *OperatorActions) DeployOperatorOrDie(info *OperatorConfig)
func (*OperatorActions) IsMembersReady ¶ added in v1.3.3
func (oa *OperatorActions) IsMembersReady(obj metav1.Object, component v1alpha1.MemberType) error
func (*OperatorActions) LabelNodes ¶
func (oa *OperatorActions) LabelNodes() error
func (*OperatorActions) LabelNodesOrDie ¶
func (oa *OperatorActions) LabelNodesOrDie()
func (*OperatorActions) ReplaceCRDOrDie ¶ added in v1.3.2
func (oa *OperatorActions) ReplaceCRDOrDie(info *OperatorConfig)
func (*OperatorActions) RunEventWorker ¶ added in v1.1.0
func (oa *OperatorActions) RunEventWorker()
func (*OperatorActions) RunKubectlOrDie ¶ added in v1.3.0
func (oa *OperatorActions) RunKubectlOrDie(args ...string) string
func (*OperatorActions) UpgradeOperator ¶
func (oa *OperatorActions) UpgradeOperator(info *OperatorConfig) error
func (*OperatorActions) UpgradeOperatorOrDie ¶
func (oa *OperatorActions) UpgradeOperatorOrDie(info *OperatorConfig)
func (*OperatorActions) WaitAdmissionWebhookReady ¶ added in v1.4.0
func (oa *OperatorActions) WaitAdmissionWebhookReady(info *OperatorConfig, timeout, pollInterval time.Duration) error
func (*OperatorActions) WaitForDmClusterDeleted ¶ added in v1.2.0
func (oa *OperatorActions) WaitForDmClusterDeleted(ns, dcName string, timeout, pollInterval time.Duration) error
func (*OperatorActions) WaitForDmClusterReady ¶ added in v1.2.0
func (*OperatorActions) WaitForTiDBDashboardReady ¶ added in v1.4.0
func (oa *OperatorActions) WaitForTiDBDashboardReady(td *v1alpha1.TidbDashboard, timeout, pollInterval time.Duration) error
func (*OperatorActions) WaitForTiDBNGMonitoringReady ¶ added in v1.3.0
func (oa *OperatorActions) WaitForTiDBNGMonitoringReady(tngm *v1alpha1.TidbNGMonitoring, timeout, pollInterval time.Duration) error
func (*OperatorActions) WaitForTidbClusterInitRandomPassword ¶ added in v1.3.0
func (oa *OperatorActions) WaitForTidbClusterInitRandomPassword(tc *v1alpha1.TidbCluster, fw portforward.PortForward, timeout, pollInterval time.Duration) error
func (*OperatorActions) WaitForTidbClusterReady ¶ added in v1.1.0
func (oa *OperatorActions) WaitForTidbClusterReady(tc *v1alpha1.TidbCluster, timeout, pollInterval time.Duration) error
FIXME: this duplicates with WaitForTidbClusterReady in crd_test_utils.go, and all functions in it TODO: sync with e2e doc
func (*OperatorActions) WaitForTidbComponentsReady ¶ added in v1.3.0
func (oa *OperatorActions) WaitForTidbComponentsReady(tc *v1alpha1.TidbCluster, componentsFilter map[v1alpha1.MemberType]struct{}, timeout, pollInterval time.Duration) error
WaitForTidbComponentsReady will wait for tidbcluster components to be ready except those specified in componentsFilter.
type OperatorConfig ¶
type OperatorConfig struct { Namespace string ReleaseName string Image string Tag string ControllerManagerReplicas *int SchedulerImage string SchedulerTag string SchedulerReplicas *int Features []string LogLevel string WebhookServiceName string WebhookSecretName string WebhookConfigName string ImagePullPolicy corev1.PullPolicy TestMode bool WebhookEnabled bool StsWebhookEnabled bool DefaultingEnabled bool ValidatingEnabled bool Cabundle string BackupImage string AutoFailover *bool AppendReleaseSuffix bool // Additional STRING values, set via --set-string flag. StringValues map[string]string Selector []string }
func (*OperatorConfig) Enabled ¶ added in v1.1.0
func (oi *OperatorConfig) Enabled(feature string) bool
func (*OperatorConfig) OperatorHelmSetBoolean ¶ added in v1.1.0
func (oi *OperatorConfig) OperatorHelmSetBoolean() string
func (*OperatorConfig) OperatorHelmSetString ¶
func (oi *OperatorConfig) OperatorHelmSetString(m map[string]string) string
type RegionInfo ¶
type RegionInfo struct { ID uint64 `json:"id"` StartKey string `json:"start_key"` EndKey string `json:"end_key"` RegionEpoch *metapb.RegionEpoch `json:"epoch,omitempty"` Peers []*metapb.Peer `json:"peers,omitempty"` Leader *metapb.Peer `json:"leader,omitempty"` DownPeers []*pdpb.PeerStats `json:"down_peers,omitempty"` PendingPeers []*metapb.Peer `json:"pending_peers,omitempty"` WrittenBytes uint64 `json:"written_bytes,omitempty"` ReadBytes uint64 `json:"read_bytes,omitempty"` ApproximateSize int64 `json:"approximate_size,omitempty"` ApproximateKeys int64 `json:"approximate_keys,omitempty"` }
RegionInfo records detail region info for api usage.
type RegionsInfo ¶
type RegionsInfo struct { Count int `json:"count"` Regions []*RegionInfo `json:"regions"` }
RegionsInfo contains some regions with the detailed region info.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
pkg
|
|
third_party
|
|
k8s/ginkgowrapper
Package ginkgowrapper wraps Ginkgo Fail and Skip functions to panic with structured data instead of a constant string.
|
Package ginkgowrapper wraps Ginkgo Fail and Skip functions to panic with structured data instead of a constant string. |