Skip to content

Commit 0db4b35

Browse files
authored
*: remove useless import and clear logic of xenonchecker. (#600)
* fix(xenon): remove useless import and clear logic * feat(xenon): Add a switch for auto rebuild
1 parent 5ec7792 commit 0db4b35

File tree

11 files changed

+286
-392
lines changed

11 files changed

+286
-392
lines changed

api/v1alpha1/mysqlcluster_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ type MysqlClusterSpec struct {
9696
// +optional
9797
// +kubebuilder:default:=6
9898
BackupScheduleJobsHistoryLimit *int `json:"backupScheduleJobsHistoryLimit,omitempty"`
99+
99100
// Containing CA (ca.crt) and server cert (tls.crt) ,server private key (tls.key) for SSL
100101
//+optional
101102
TlsSecretName string `json:"tlsSecretName,omitempty"`
@@ -168,6 +169,11 @@ type XenonOpts struct {
168169
// +kubebuilder:default:=10000
169170
ElectionTimeout *int32 `json:"electionTimeout,omitempty"`
170171

172+
// If true, when the data is inconsistent, Xenon will automatically rebuild the invalid node.
173+
// +optional
174+
// +kubebuilder:default:=false
175+
EnableAutoRebuild bool `json:"enableAutoRebuild,omitempty"`
176+
171177
// The compute resource requirements.
172178
// +optional
173179
// +kubebuilder:default:={limits: {cpu: "100m", memory: "256Mi"}, requests: {cpu: "50m", memory: "128Mi"}}

build/xenon/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
FROM golang:1.16 as builder
66

7-
ARG XENON_BRANCH=origin_test
7+
ARG XENON_BRANCH=master
88
RUN go env -w GOPROXY=https://goproxy.cn,direct && go env -w GO111MODULE=off;
99
RUN set -ex; \
1010
mkdir -p /go/src/github.com/radondb; \
1111
cd /go/src/github.com/radondb; \
12-
git clone --branch $XENON_BRANCH https://github.com/zhl003/xenon.git; \
12+
git clone --branch $XENON_BRANCH https://github.com/radondb/xenon.git; \
1313
cd xenon; \
1414
make build
1515
WORKDIR /workspace

charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,11 @@ spec:
12931293
is millisecond.
12941294
format: int32
12951295
type: integer
1296+
enableAutoRebuild:
1297+
default: false
1298+
description: If true, when the data is inconsistent, Xenon will
1299+
automatically rebuild the invalid node.
1300+
type: boolean
12961301
image:
12971302
default: radondb/xenon:1.1.5-alpha
12981303
description: To specify the image that will be used for xenon

0 commit comments

Comments
 (0)