Skip to content

Commit

Permalink
Update MySQLClusterMode constants (#808)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha authored Oct 10, 2021
1 parent 8ce33b1 commit ad8c1f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apis/kubedb/v1alpha2/mysql_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ func (m MySQL) StatsServiceLabels() map[string]string {
func (m *MySQL) UsesGroupReplication() bool {
return m.Spec.Topology != nil &&
m.Spec.Topology.Mode != nil &&
*m.Spec.Topology.Mode == MySQLClusterModeGroup
*m.Spec.Topology.Mode == MySQLClusterModeGroupReplication
}

func (m *MySQL) IsInnoDBCluster() bool {
return m.Spec.Topology != nil &&
m.Spec.Topology.Mode != nil &&
*m.Spec.Topology.Mode == InnoDBClusterModeGroup
*m.Spec.Topology.Mode == MySQLClusterModeInnoDBCluster
}

func (m *MySQL) SetDefaults(topology *core_util.Topology) {
Expand Down
4 changes: 2 additions & 2 deletions apis/kubedb/v1alpha2/mysql_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const (
type MySQLClusterMode string

const (
MySQLClusterModeGroup MySQLClusterMode = "GroupReplication"
InnoDBClusterModeGroup MySQLClusterMode = "InnoDBCluster"
MySQLClusterModeGroupReplication MySQLClusterMode = "GroupReplication"
MySQLClusterModeInnoDBCluster MySQLClusterMode = "InnoDBCluster"
)

// +kubebuilder:validation:Enum=Single-Primary
Expand Down

0 comments on commit ad8c1f7

Please sign in to comment.