Skip to content

Commit

Permalink
add md default strategy
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 Dec 4, 2024
1 parent dd9c2f6 commit e97739d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apis/kubedb/v1/mariadb_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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 @@ -221,7 +222,9 @@ func (m *MariaDB) SetDefaults(mdVersion *v1alpha1.MariaDBVersion) {
if m.Spec.PodTemplate.Spec.ServiceAccountName == "" {
m.Spec.PodTemplate.Spec.ServiceAccountName = m.OffshootName()
}

if m.Spec.Init != nil && m.Spec.Init.Archiver != nil && m.Spec.Init.Archiver.ReplicationStrategy == nil {
m.Spec.Init.Archiver.ReplicationStrategy = ptr.To(ReplicationStrategyNone)
}
m.setDefaultContainerSecurityContext(mdVersion, &m.Spec.PodTemplate)
m.setDefaultContainerResourceLimits(&m.Spec.PodTemplate)
m.SetTLSDefaults()
Expand Down

0 comments on commit e97739d

Please sign in to comment.