Skip to content

Commit

Permalink
Merge pull request #318 from acekingke/livenessMysql
Browse files Browse the repository at this point in the history
sysbench press the database, Pod is recreated by k8s #305
  • Loading branch information
andyli029 authored Dec 1, 2021
2 parents e631933 + 7a24589 commit 10f08ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions mysqlcluster/container/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ 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),
},
Command: []string{"pgrep", "mysqld"},
},
},
InitialDelaySeconds: 30,
Expand Down
2 changes: 1 addition & 1 deletion mysqlcluster/container/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestGetMysqlLivenessProbe(t *testing.T) {
livenessProbe := &corev1.Probe{
Handler: corev1.Handler{
Exec: &corev1.ExecAction{
Command: []string{"sh", "-c", "mysqladmin --defaults-file=/etc/mysql/client.conf ping"},
Command: []string{"pgrep", "mysqld"},
},
},
InitialDelaySeconds: 30,
Expand Down

0 comments on commit 10f08ce

Please sign in to comment.