diff --git a/apis/kubedb/constants.go b/apis/kubedb/constants.go index 283d12025b..6501cf0150 100644 --- a/apis/kubedb/constants.go +++ b/apis/kubedb/constants.go @@ -1605,6 +1605,16 @@ var ( defaultArbiter = core.ResourceRequirements{ Requests: core.ResourceList{ core.ResourceStorage: resource.MustParse("2Gi"), + // these are the default cpu & memory for a coordinator container + core.ResourceCPU: resource.MustParse(".200"), + core.ResourceMemory: resource.MustParse("250Mi"), + }, + Limits: core.ResourceList{ + core.ResourceMemory: resource.MustParse("250Mi"), + }, + } + DefaultArbiterMemoryIntensive = core.ResourceRequirements{ + Requests: core.ResourceList{ // these are the default cpu & memory for a coordinator container core.ResourceCPU: resource.MustParse(".200"), core.ResourceMemory: resource.MustParse("500Mi"), diff --git a/apis/kubedb/v1/mongodb_helpers.go b/apis/kubedb/v1/mongodb_helpers.go index a68adf20dd..1f781057ef 100644 --- a/apis/kubedb/v1/mongodb_helpers.go +++ b/apis/kubedb/v1/mongodb_helpers.go @@ -735,7 +735,11 @@ func (m *MongoDB) setContainerDefaultValues(container *core.Container, mgVersion defaultResource core.ResourceRequirements, isArbiter ...bool, ) { if len(isArbiter) > 0 && isArbiter[0] { - m.setContainerDefaultResources(container, kubedb.DefaultArbiter(true)) + if m.isLaterVersion(mgVersion, 7) { + m.setContainerDefaultResources(container, kubedb.DefaultArbiterMemoryIntensive) + } else { + m.setContainerDefaultResources(container, kubedb.DefaultArbiter(true)) + } } else { m.setContainerDefaultResources(container, defaultResource) }