@@ -21,20 +21,20 @@ import (
21
21
"context"
22
22
"errors"
23
23
"fmt"
24
- "sort"
25
- "strings"
26
-
27
24
"github.com/blang/semver"
28
25
"github.com/go-ini/ini"
29
26
"github.com/go-logr/logr"
30
27
corev1 "k8s.io/api/core/v1"
31
28
k8serrors "k8s.io/apimachinery/pkg/api/errors"
32
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
33
30
"k8s.io/apimachinery/pkg/runtime"
31
+ osrun "runtime"
34
32
"sigs.k8s.io/controller-runtime/pkg/client"
35
33
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
36
34
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
37
35
logf "sigs.k8s.io/controller-runtime/pkg/log"
36
+ "sort"
37
+ "strings"
38
38
39
39
"github.com/radondb/radondb-mysql-kubernetes/mysqlcluster"
40
40
"github.com/radondb/radondb-mysql-kubernetes/utils"
@@ -178,7 +178,10 @@ func (s *mysqlCMSyncer) appendConf() error {
178
178
return err
179
179
}
180
180
if s .Spec .MysqlVersion == "8.0" {
181
- str := pluginConfigs ["plugin-load" ]
181
+ var str string = pluginConfigs ["plugin-load" ]
182
+ if osrun .GOARCH == "aarch64" || osrun .GOARCH == "arm64" {
183
+ str = "\" semisync_master.so;semisync_slave.so\" "
184
+ }
182
185
str = str [0 :len (str )- 1 ] + ";mysql_clone.so\" "
183
186
if s .Spec .MysqlOpts .PluginConf != nil {
184
187
s .Spec .MysqlOpts .PluginConf ["plugin-load" ] = str
@@ -333,7 +336,19 @@ func buildMysqlConf(c *mysqlcluster.MysqlCluster) (string, error) {
333
336
func buildMysqlPluginConf (c * mysqlcluster.MysqlCluster ) (string , error ) {
334
337
cfg := ini .Empty (ini.LoadOptions {IgnoreInlineComment : true })
335
338
sec := cfg .Section ("mysqld" )
336
- addKVConfigsToSection (sec , pluginConfigs )
339
+ pluginConfigsCpy := make (map [string ]string )
340
+ cpyMap (pluginConfigs , pluginConfigsCpy )
341
+
342
+ if osrun .GOARCH == "aarch64" || osrun .GOARCH == "arm64" {
343
+ delete (pluginConfigsCpy , "audit_log_file" )
344
+ delete (pluginConfigsCpy , "audit_log_exclude_accounts" )
345
+ delete (pluginConfigsCpy , "audit_log_buffer_size" )
346
+ delete (pluginConfigsCpy , "audit_log_policy" )
347
+ delete (pluginConfigsCpy , "audit_log_rotate_on_size" )
348
+ delete (pluginConfigsCpy , "audit_log_rotations" )
349
+ delete (pluginConfigsCpy , "audit_log_format" )
350
+ }
351
+ addKVConfigsToSection (sec , pluginConfigsCpy )
337
352
addKVConfigsToSection (sec , c .Spec .MysqlOpts .PluginConf )
338
353
data , err := writeConfigs (cfg )
339
354
if err != nil {
0 commit comments