Skip to content

Commit

Permalink
chore: support mysql orc semi sync
Browse files Browse the repository at this point in the history
  • Loading branch information
kubeJocker committed Jan 22, 2025
1 parent a1de283 commit 698bd01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion addons/mysql/templates/switchover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@ spec:
- /bin/sh
- -c
- |
curl -s http://${ORC_ENDPOINTS}/api/graceful-master-takeover-auto/${candidate}
response=$(curl -s -o /dev/null -w "%{http_code}" http://${ORC_ENDPOINTS}/api/graceful-master-takeover-auto/${candidate})
if [ ! $response -eq 200 ]; then
echo "switchover failed, please check the candidate format: {podName}.{namespace}"
exit 1
fi
2 changes: 1 addition & 1 deletion addons/orchestrator/configs/orchestrator.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MySQLTopologySSLCertFile": "",
"MySQLTopologySSLCAFile": "",
"MySQLTopologySSLSkipVerify": true,
"MySQLTopologyUseMutualTLS": true,
"MySQLTopologyUseMutualTLS": false,
"MySQLOrchestratorHost": "${META_MYSQL_ENDPOINT}",
"MySQLOrchestratorPort": ${META_MYSQL_PORT},
Expand Down
2 changes: 1 addition & 1 deletion examples/mysql/switchover-orc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ spec:
- componentName: mysql
parameters:
- name: candidate
value: mysql-cluster-mysql-1
value: mysql-cluster-mysql-1.default
opsDefinitionName: mysql-orc-switchover # predefined opsdefinition for switchover

0 comments on commit 698bd01

Please sign in to comment.