From 2fa3548ebe7cba1290ede7703a2829ac858e26c2 Mon Sep 17 00:00:00 2001 From: Ashraful Haque Tani <48568933+AshrafulHaqueToni@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:01:05 +0600 Subject: [PATCH] Add MySQL Multi Primary Option in Group Replication Mode (#1348) Signed-off-by: Ashraful Haque Tani --- apis/kubedb/v1/mysql_types.go | 4 ++-- apis/kubedb/v1alpha2/mysql_types.go | 4 ++-- crds/kubedb.com_mysqls.yaml | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apis/kubedb/v1/mysql_types.go b/apis/kubedb/v1/mysql_types.go index b9a8e37456..9b3ddcb1a2 100644 --- a/apis/kubedb/v1/mysql_types.go +++ b/apis/kubedb/v1/mysql_types.go @@ -41,12 +41,12 @@ const ( MySQLModeSemiSync MySQLMode = "SemiSync" ) -// +kubebuilder:validation:Enum=Single-Primary +// +kubebuilder:validation:Enum=Single-Primary;Multi-Primary type MySQLGroupMode string const ( MySQLGroupModeSinglePrimary MySQLGroupMode = "Single-Primary" - // MySQLGroupModeMultiPrimary MySQLGroupMode = "Multi-Primary" + MySQLGroupModeMultiPrimary MySQLGroupMode = "Multi-Primary" ) // Mysql defines a Mysql database. diff --git a/apis/kubedb/v1alpha2/mysql_types.go b/apis/kubedb/v1alpha2/mysql_types.go index 467bb78bc2..2085a58e49 100644 --- a/apis/kubedb/v1alpha2/mysql_types.go +++ b/apis/kubedb/v1alpha2/mysql_types.go @@ -41,12 +41,12 @@ const ( MySQLModeSemiSync MySQLMode = "SemiSync" ) -// +kubebuilder:validation:Enum=Single-Primary +// +kubebuilder:validation:Enum=Single-Primary;Multi-Primary type MySQLGroupMode string const ( MySQLGroupModeSinglePrimary MySQLGroupMode = "Single-Primary" - // MySQLGroupModeMultiPrimary MySQLGroupMode = "Multi-Primary" + MySQLGroupModeMultiPrimary MySQLGroupMode = "Multi-Primary" ) // Mysql defines a Mysql database. diff --git a/crds/kubedb.com_mysqls.yaml b/crds/kubedb.com_mysqls.yaml index d6c74e1f05..54425a75d5 100644 --- a/crds/kubedb.com_mysqls.yaml +++ b/crds/kubedb.com_mysqls.yaml @@ -4815,6 +4815,7 @@ spec: default: Single-Primary enum: - Single-Primary + - Multi-Primary type: string name: type: string @@ -4825,6 +4826,7 @@ spec: default: Single-Primary enum: - Single-Primary + - Multi-Primary type: string router: properties: @@ -12478,6 +12480,7 @@ spec: default: Single-Primary enum: - Single-Primary + - Multi-Primary type: string name: type: string @@ -12488,6 +12491,7 @@ spec: default: Single-Primary enum: - Single-Primary + - Multi-Primary type: string router: properties: