func (c *mysql) getLivenessProbe() *corev1.Probe {
	return &corev1.Probe{
		Handler: corev1.Handler{
			Exec: &corev1.ExecAction{
				Command: []string{
					"sh",
					"-c",
					fmt.Sprintf("mysqladmin --defaults-file=%s ping", utils.ConfClientPath),
				},
			},
		},
		InitialDelaySeconds: 30,
		TimeoutSeconds:      5,
		PeriodSeconds:       10,
		SuccessThreshold:    1,
		FailureThreshold:    3,
	}
}
getLivenessProbe get the container livenessProbe.
package container
import (
	"fmt"
	corev1 "k8s.io/api/core/v1"
	"github.com/radondb/radondb-mysql-kubernetes/mysqlcluster"
	"github.com/radondb/radondb-mysql-kubernetes/utils"
)
type mysql struct {
	*mysqlcluster.MysqlCluster
	name string
}
func (c *mysql) getName() string {
	return c.name
}
func (c *mysql) getImage() string {
	img := utils.MysqlImageVersions[c.GetMySQLVersion()]
	return img
}
func (c *mysql) getCommand() []string {
	return nil
}
func (c *mysql) getEnvVars() []corev1.EnvVar {
	if c.Spec.MysqlOpts.InitTokuDB {
		return []corev1.EnvVar{
			{
				Name:  "INIT_TOKUDB",
				Value: "1",
			},
		}
	}
	return nil
}
func (c *mysql) getLifecycle() *corev1.Lifecycle {
	return nil
}
func (c *mysql) getResources() corev1.ResourceRequirements {
	return c.Spec.MysqlOpts.Resources
}
func (c *mysql) getPorts() []corev1.ContainerPort {
	return []corev1.ContainerPort{
		{
			Name:          utils.MysqlPortName,
			ContainerPort: utils.MysqlPort,
		},
	}
}