Documentation ¶
Index ¶
- func AddLabelsToJobs(jobs []*batchv1.Job, labels map[string]string)
- func AddResourceLimitsToJobs(jobs []*batchv1.Job, limits *v1alpha1.ResourceList)
- func AddResourceRequestsToJobs(jobs []*batchv1.Job, requests *v1alpha1.ResourceList)
- func AddTolerationToJobs(jobs []*batchv1.Job, tolerations []corev1.Toleration)
- func CleanMongoDatabaseContainer(target v1alpha1.Target, database string) *corev1.Container
- func CleanMysqlDatabaseContainer(target v1alpha1.Target, database string) *corev1.Container
- func CleanPGDatabaseContainer(target v1alpha1.Target, database string) *corev1.Container
- func DeleteJob(cli client.Client, reqCtx context.Context, jobName string, namespace string) error
- func GetJobStatus(cli client.Client, reqCtx context.Context, jobName string, namespace string) (*batchv1.JobStatus, error)
- func GetLogFromPod(rsc *rest.Config, reqCtx context.Context, podName string, namespace string) (string, error)
- func GetPodListFromJob(cli client.Client, reqCtx context.Context, jobName string, namespace string) (*corev1.PodList, error)
- func InitMysqlDatabaseContainer(target v1alpha1.Target, database string) *corev1.Container
- func InitPGDatabaseContainer(target v1alpha1.Target, database string) *corev1.Container
- func IsJobExisted(cli client.Client, reqCtx context.Context, jobName string, namespace string) (bool, error)
- func IsJobSuccessful(cli client.Client, reqCtx context.Context, jobName string, namespace string) (bool, error)
- func JobTemplate(name, namespace string) *batchv1.Job
- func LogJobPodToCond(cli client.Client, restConfig *rest.Config, reqCtx context.Context, ...) error
- func NewMongodbPreCheckJob(name string, namespace string, target v1alpha1.Target) *batchv1.Job
- func NewMysqlPreCheckJob(name, namespace string, target v1alpha1.Target) *batchv1.Job
- func NewPgbenchPreCheckJob(name string, namespace string, target v1alpha1.Target) *batchv1.Job
- func NewPreCheckJob(name, namespace string, driver string, target *v1alpha1.Target) *batchv1.Job
- func NewRedisPreCheckJob(name, namespace string, target v1alpha1.Target) *batchv1.Job
- func RecordFailedLogToCond(conditions *[]metav1.Condition, msg string)
- func RecordSuccessfulLogToCond(conditions *[]metav1.Condition, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddResourceLimitsToJobs ¶
func AddResourceLimitsToJobs(jobs []*batchv1.Job, limits *v1alpha1.ResourceList)
func AddResourceRequestsToJobs ¶
func AddResourceRequestsToJobs(jobs []*batchv1.Job, requests *v1alpha1.ResourceList)
func AddTolerationToJobs ¶
func AddTolerationToJobs(jobs []*batchv1.Job, tolerations []corev1.Toleration)
func GetJobStatus ¶
func GetLogFromPod ¶
func GetPodListFromJob ¶
func InitMysqlDatabaseContainer ¶
InitMysqlDatabaseContainer will create a database in mysql
func InitPGDatabaseContainer ¶
InitPGDatabaseContainer will create a database in postgresql
func IsJobExisted ¶
func IsJobSuccessful ¶
func JobTemplate ¶
func LogJobPodToCond ¶
func LogJobPodToCond(cli client.Client, restConfig *rest.Config, reqCtx context.Context, jobName string, namespace string, conditions *[]metav1.Condition, call func(string) string) error
LogJobPodToCond record the log of job's pods to the conditions
func NewMongodbPreCheckJob ¶
func NewMysqlPreCheckJob ¶
NewMysqlPreCheckJob create a job to check the mysql connection
func NewPgbenchPreCheckJob ¶
NewPgbenchPreCheckJob create a job to check the pgbench connection
func NewPreCheckJob ¶
NewPreCheckJob create a job to check the connection
func NewRedisPreCheckJob ¶
func RecordFailedLogToCond ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.