Skip to content

Commit 184f372

Browse files
committed
configure bind_address
1 parent 192de7c commit 184f372

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

build/ps-entrypoint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ create_default_cnf() {
153153
echo '[mysqld]' >$CFG
154154
sed -i "/\[mysqld\]/a read_only=ON" $CFG
155155
sed -i "/\[mysqld\]/a server_id=${SERVER_ID}" $CFG
156+
sed -i "/\[mysqld\]/a bind_address=${POD_IP}" $CFG
156157
sed -i "/\[mysqld\]/a admin-address=${POD_IP}" $CFG
157158
sed -i "/\[mysqld\]/a report_host=${FQDN}" $CFG
158159
sed -i "/\[mysqld\]/a report_port=3306" $CFG

cmd/bootstrap/main.go

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import (
99
"github.com/percona/percona-server-mysql-operator/pkg/mysql"
1010
)
1111

12+
var (
13+
GitCommit string
14+
BuildTime string
15+
)
16+
1217
const (
1318
fullClusterCrashFile = "/var/lib/mysql/full-cluster-crash"
1419
manualRecoveryFile = "/var/lib/mysql/sleep-forever"
@@ -22,6 +27,8 @@ func main() {
2227
defer f.Close()
2328
log.SetOutput(f)
2429

30+
log.Printf("starting bootstrap... GitCommit: %s BuildTime: %s", GitCommit, BuildTime)
31+
2532
fullClusterCrash, err := fileExists(fullClusterCrashFile)
2633
if err == nil && fullClusterCrash {
2734
log.Printf("%s exists. exiting...", fullClusterCrashFile)

0 commit comments

Comments
 (0)