Skip to content

Commit

Permalink
set coordinator for shard (#1251)
Browse files Browse the repository at this point in the history
Signed-off-by: sayedppqq <[email protected]>
  • Loading branch information
sayedppqq authored Jul 8, 2024
1 parent acca053 commit a1c4cd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apis/kubedb/v1alpha2/mongodb_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,12 +731,12 @@ func (m *MongoDB) SetDefaults(mgVersion *v1alpha1.MongoDBVersion, topology *core
apis.SetDefaultResourceLimits(&m.Spec.Hidden.PodTemplate.Spec.Resources, defaultResource)
m.setDefaultSecurityContext(mgVersion, &m.Spec.Hidden.PodTemplate)
}
if m.Spec.ReplicaSet != nil {
if m.Spec.Coordinator.SecurityContext == nil {
m.Spec.Coordinator.SecurityContext = &core.SecurityContext{}
}
m.assignDefaultContainerSecurityContext(mgVersion, m.Spec.Coordinator.SecurityContext) // modeDetector container
}
if m.Spec.ShardTopology != nil || m.Spec.ReplicaSet != nil {
if m.Spec.Coordinator.SecurityContext == nil {
m.Spec.Coordinator.SecurityContext = &core.SecurityContext{}
}
m.assignDefaultContainerSecurityContext(mgVersion, m.Spec.Coordinator.SecurityContext) // modeDetector container
}

m.SetTLSDefaults()
Expand Down

0 comments on commit a1c4cd9

Please sign in to comment.