Skip to content

Commit

Permalink
Add ReplicationStrategy Default Value for MySQL
Browse files Browse the repository at this point in the history
Signed-off-by: SK Ali Arman <[email protected]>
  • Loading branch information
sheikh-arman committed Nov 29, 2024
1 parent 2198d91 commit 0f08e75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/kubedb/v1/mysql_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
core "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/utils/ptr"
kmapi "kmodules.xyz/client-go/api/v1"
"kmodules.xyz/client-go/apiextensions"
core_util "kmodules.xyz/client-go/core/v1"
Expand Down Expand Up @@ -316,6 +317,9 @@ func (m *MySQL) SetDefaults(myVersion *v1alpha1.MySQLVersion) {
m.Spec.Monitor.Prometheus.Exporter.SecurityContext.RunAsGroup = myVersion.Spec.SecurityContext.RunAsUser
}
}
if m.Spec.Init != nil && m.Spec.Init.Archiver != nil && m.Spec.Init.Archiver.ReplicationStrategy == nil {
m.Spec.Init.Archiver.ReplicationStrategy = ptr.To(ReplicationStrategyNone)
}
}

func (m *MySQL) SetTLSDefaults() {
Expand Down

0 comments on commit 0f08e75

Please sign in to comment.