Repository: koordinator-sh/koordinator

Issue:
[BUG] The Pod cannot be scheduled because the runtimeQuota is less than the minQuota
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!-->

**What happened**:
The Pod fails to schedule because ​the calculated runtimeQuota is less than the minQuota when the requested resources exceed the defined minimum threshold. Quota information as follows:

```yaml
apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
  annotations:
    quota.scheduling.koordinator.sh/child-request: '{"cpu":"200500m","memory":"819712Mi","nvidia.com/gpu":"8"}'
    quota.scheduling.koordinator.sh/request: '{"cpu":"200500m","memory":"819712Mi","nvidia.com/gpu":"8"}'
    quota.scheduling.koordinator.sh/runtime: '{"cpu":"197819m","memory":"749671274133","nvidia.com/gpu":"7"}'
    quota.scheduling.koordinator.sh/shared-weight: '{"cpu":"200","memory":"20000Gi","nvidia.com/gpu":"8"}'
  labels:
    quota.scheduling.koordinator.sh/allow-lent-resource: "true"
    quota.scheduling.koordinator.sh/is-parent: "true"
    quota.scheduling.koordinator.sh/parent: cluster-root-quota.gpu
  name: quota-pub.gpu
  namespace: koordinator-system
spec:
  max:
    cpu: "200"
    memory: 1000Gi
    nvidia.com/gpu: "8"
  min:
    cpu: "200"
    memory: 1000Gi
    nvidia.com/gpu: "8"
status:
  used:
    cpu: "100"
    memory: 400Gi
    nvidia.com/gpu: "4"

---

apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
  annotations:
    quota.scheduling.koordinator.sh/child-request: '{"cpu":"200","memory":"819712Mi","nvidia.com/gpu":"8"}'
    quota.scheduling.koordinator.sh/request: '{"cpu":"218","memory":"1500Gi","nvidia.com/gpu":"8"}'
    quota.scheduling.koordinator.sh/runtime: '{"cpu":"197819m","memory":"749671274133","nvidia.com/gpu":"7"}'
    quota.scheduling.koordinator.sh/shared-weight: '{"cpu":"200","memory":"20000Gi","nvidia.com/gpu":"2000"}'
  labels:
    quota.scheduling.koordinator.sh/allow-lent-resource: "false"
    quota.scheduling.koordinator.sh/is-parent: "true"
    quota.scheduling.koordinator.sh/parent: koordinator-root-quota
  name: cluster-root-quota.gpu
  namespace: koordinator-system
spec:
  max:
    cpu: "218"
    memory: 1500Gi
    nvidia.com/gpu: "8"
  min:
    cpu: "218"
    memory: 1500Gi
    nvidia.com/gpu: "8"
status:
  used:
    cpu: "100"
    memory: 400Gi
    nvidia.com/gpu: "4"
```
**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- App version: 1.6.0
- Kubernetes version (use `kubectl version`): 1.28
- Install details (e.g. helm install args): helm
- Node environment (for koordlet/runtime-proxy issue):
  - Containerd/Docker version:
  - OS version:
  - Kernal version:
  - Cgroup driver: cgroupfs/systemd
- Others:



Discussion:
@qinfustu: The issue was resolved by disabling the ​​scaleMinQuota​​ logic. The code has been modified, and we plan to migrate this change to the configuration file.
```go
// quotaManager.setScaleMinQuotaEnabled(true) 
quotaManager.setScaleMinQuotaEnabled(false) 
```@ZiMengSheng: This modification can be abstracted into a FG @qinfustu 

Solution patch:
diff --git a/pkg/scheduler/apis/config/types.go b/pkg/scheduler/apis/config/types.go
index b614d444..449c735b 100644
--- a/pkg/scheduler/apis/config/types.go
+++ b/pkg/scheduler/apis/config/types.go
@@ -221,6 +221,9 @@ type ElasticQuotaArgs struct {
 	// EnableRuntimeQuota if false, use max instead of runtime for all checks.
 	EnableRuntimeQuota bool
 
+	// EnableMinQuotaScale if true, min will be scaled when minQuotaSum > totalRes.
+	EnableMinQuotaScale bool
+
 	// DisableDefaultQuotaPreemption if true, will not preempt pods in default quota.
 	DisableDefaultQuotaPreemption bool
 
diff --git a/pkg/scheduler/apis/config/v1/defaults.go b/pkg/scheduler/apis/config/v1/defaults.go
index 8d6b2948..cc22e965 100644
--- a/pkg/scheduler/apis/config/v1/defaults.go
+++ b/pkg/scheduler/apis/config/v1/defaults.go
@@ -72,6 +72,7 @@ var (
 	defaultMonitorAllQuotas              = pointer.Bool(false)
 	defaultEnableCheckParentQuota        = pointer.Bool(false)
 	defaultEnableRuntimeQuota            = pointer.Bool(true)
+	defaultEnableMinQuotaScale           = pointer.Bool(true)
 	defaultDisableDefaultQuotaPreemption = pointer.Bool(true)
 
 	defaultTimeout           = 600 * time.Second
@@ -199,6 +200,9 @@ func SetDefaults_ElasticQuotaArgs(obj *ElasticQuotaArgs) {
 	if obj.EnableRuntimeQuota == nil {
 		obj.EnableRuntimeQuota = defaultEnableRuntimeQuota
 	}
+	if obj.EnableMinQuotaScale == nil {
+		obj.EnableMinQuotaScale = defaultEnableMinQuotaScale
+	}
 	if obj.DisableDefaultQuotaPreemption == nil {
 		obj.DisableDefaultQuotaPreemption = defaultDisableDefaultQuotaPreemption
 	}
diff --git a/pkg/scheduler/apis/config/v1/types.go b/pkg/scheduler/apis/config/v1/types.go
index ef931de5..cdc27680 100644
--- a/pkg/scheduler/apis/config/v1/types.go
+++ b/pkg/scheduler/apis/config/v1/types.go
@@ -216,6 +216,9 @@ type ElasticQuotaArgs struct {
 	// EnableRuntimeQuota if false, use max instead of runtime for all checks.
 	EnableRuntimeQuota *bool `json:"enableRuntimeQuota,omitempty"`
 
+	// EnableMinQuotaScale if true, min will be scaled when minQuotaSum > totalRes.
+	EnableMinQuotaScale *bool `json:"enableMinQuotaScale,omitempty"`
+
 	// DisableDefaultQuotaPreemption if true, will not preempt pods in default quota.
 	DisableDefaultQuotaPreemption *bool `json:"disableDefaultQuotaPreemption,omitempty"`
 
diff --git a/pkg/scheduler/apis/config/v1/zz_generated.conversion.go b/pkg/scheduler/apis/config/v1/zz_generated.conversion.go
index e5c715ef..ce419caa 100644
--- a/pkg/scheduler/apis/config/v1/zz_generated.conversion.go
+++ b/pkg/scheduler/apis/config/v1/zz_generated.conversion.go
@@ -255,6 +255,9 @@ func autoConvert_v1_ElasticQuotaArgs_To_config_ElasticQuotaArgs(in *ElasticQuota
 	if err := metav1.Convert_Pointer_bool_To_bool(&in.EnableRuntimeQuota, &out.EnableRuntimeQuota, s); err != nil {
 		return err
 	}
+	if err := metav1.Convert_Pointer_bool_To_bool(&in.EnableMinQuotaScale, &out.EnableMinQuotaScale, s); err != nil {
+		return err
+	}
 	if err := metav1.Convert_Pointer_bool_To_bool(&in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption, s); err != nil {
 		return err
 	}
@@ -286,6 +289,9 @@ func autoConvert_config_ElasticQuotaArgs_To_v1_ElasticQuotaArgs(in *config.Elast
 	if err := metav1.Convert_bool_To_Pointer_bool(&in.EnableRuntimeQuota, &out.EnableRuntimeQuota, s); err != nil {
 		return err
 	}
+	if err := metav1.Convert_bool_To_Pointer_bool(&in.EnableMinQuotaScale, &out.EnableMinQuotaScale, s); err != nil {
+		return err
+	}
 	if err := metav1.Convert_bool_To_Pointer_bool(&in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption, s); err != nil {
 		return err
 	}
diff --git a/pkg/scheduler/apis/config/v1/zz_generated.deepcopy.go b/pkg/scheduler/apis/config/v1/zz_generated.deepcopy.go
index 17d64b56..24d02eae 100644
--- a/pkg/scheduler/apis/config/v1/zz_generated.deepcopy.go
+++ b/pkg/scheduler/apis/config/v1/zz_generated.deepcopy.go
@@ -146,6 +146,11 @@ func (in *ElasticQuotaArgs) DeepCopyInto(out *ElasticQuotaArgs) {
 		*out = new(bool)
 		**out = **in
 	}
+	if in.EnableMinQuotaScale != nil {
+		in, out := &in.EnableMinQuotaScale, &out.EnableMinQuotaScale
+		*out = new(bool)
+		**out = **in
+	}
 	if in.DisableDefaultQuotaPreemption != nil {
 		in, out := &in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption
 		*out = new(bool)
diff --git a/pkg/scheduler/apis/config/v1beta3/defaults.go b/pkg/scheduler/apis/config/v1beta3/defaults.go
index 7e0c66cf..f7913a8d 100644
--- a/pkg/scheduler/apis/config/v1beta3/defaults.go
+++ b/pkg/scheduler/apis/config/v1beta3/defaults.go
@@ -72,6 +72,7 @@ var (
 	defaultMonitorAllQuotas              = pointer.Bool(false)
 	defaultEnableCheckParentQuota        = pointer.Bool(false)
 	defaultEnableRuntimeQuota            = pointer.Bool(true)
+	defaultEnableMinQuotaScale           = pointer.Bool(true)
 	defaultDisableDefaultQuotaPreemption = pointer.Bool(true)
 
 	defaultTimeout           = 600 * time.Second
@@ -199,6 +200,9 @@ func SetDefaults_ElasticQuotaArgs(obj *ElasticQuotaArgs) {
 	if obj.EnableRuntimeQuota == nil {
 		obj.EnableRuntimeQuota = defaultEnableRuntimeQuota
 	}
+	if obj.EnableMinQuotaScale == nil {
+		obj.EnableMinQuotaScale = defaultEnableMinQuotaScale
+	}
 	if obj.DisableDefaultQuotaPreemption == nil {
 		obj.DisableDefaultQuotaPreemption = defaultDisableDefaultQuotaPreemption
 	}
diff --git a/pkg/scheduler/apis/config/v1beta3/types.go b/pkg/scheduler/apis/config/v1beta3/types.go
index 466dc92c..15a133fe 100644
--- a/pkg/scheduler/apis/config/v1beta3/types.go
+++ b/pkg/scheduler/apis/config/v1beta3/types.go
@@ -217,6 +217,9 @@ type ElasticQuotaArgs struct {
 	// EnableRuntimeQuota if false, use max instead of runtime for all checks.
 	EnableRuntimeQuota *bool `json:"enableRuntimeQuota,omitempty"`
 
+	// EnableMinQuotaScale if true, min will be scaled when minQuotaSum > totalRes.
+	EnableMinQuotaScale *bool `json:"enableMinQuotaScale,omitempty"`
+
 	// DisableDefaultQuotaPreemption if true, will not preempt pods in default quota.
 	DisableDefaultQuotaPreemption *bool `json:"disableDefaultQuotaPreemption,omitempty"`
 
diff --git a/pkg/scheduler/apis/config/v1beta3/zz_generated.conversion.go b/pkg/scheduler/apis/config/v1beta3/zz_generated.conversion.go
index 93f188fe..27e4450b 100644
--- a/pkg/scheduler/apis/config/v1beta3/zz_generated.conversion.go
+++ b/pkg/scheduler/apis/config/v1beta3/zz_generated.conversion.go
@@ -255,6 +255,9 @@ func autoConvert_v1beta3_ElasticQuotaArgs_To_config_ElasticQuotaArgs(in *Elastic
 	if err := v1.Convert_Pointer_bool_To_bool(&in.EnableRuntimeQuota, &out.EnableRuntimeQuota, s); err != nil {
 		return err
 	}
+	if err := v1.Convert_Pointer_bool_To_bool(&in.EnableMinQuotaScale, &out.EnableMinQuotaScale, s); err != nil {
+		return err
+	}
 	if err := v1.Convert_Pointer_bool_To_bool(&in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption, s); err != nil {
 		return err
 	}
@@ -286,6 +289,9 @@ func autoConvert_config_ElasticQuotaArgs_To_v1beta3_ElasticQuotaArgs(in *config.
 	if err := v1.Convert_bool_To_Pointer_bool(&in.EnableRuntimeQuota, &out.EnableRuntimeQuota, s); err != nil {
 		return err
 	}
+	if err := v1.Convert_bool_To_Pointer_bool(&in.EnableMinQuotaScale, &out.EnableMinQuotaScale, s); err != nil {
+		return err
+	}
 	if err := v1.Convert_bool_To_Pointer_bool(&in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption, s); err != nil {
 		return err
 	}
diff --git a/pkg/scheduler/apis/config/v1beta3/zz_generated.deepcopy.go b/pkg/scheduler/apis/config/v1beta3/zz_generated.deepcopy.go
index 2edac8ce..b4bb2875 100644
--- a/pkg/scheduler/apis/config/v1beta3/zz_generated.deepcopy.go
+++ b/pkg/scheduler/apis/config/v1beta3/zz_generated.deepcopy.go
@@ -146,6 +146,11 @@ func (in *ElasticQuotaArgs) DeepCopyInto(out *ElasticQuotaArgs) {
 		*out = new(bool)
 		**out = **in
 	}
+	if in.EnableMinQuotaScale != nil {
+		in, out := &in.EnableMinQuotaScale, &out.EnableMinQuotaScale
+		*out = new(bool)
+		**out = **in
+	}
 	if in.DisableDefaultQuotaPreemption != nil {
 		in, out := &in.DisableDefaultQuotaPreemption, &out.DisableDefaultQuotaPreemption
 		*out = new(bool)
diff --git a/pkg/scheduler/plugins/elasticquota/core/group_quota_manager.go b/pkg/scheduler/plugins/elasticquota/core/group_quota_manager.go
index 872c7a52..d47e0cab 100644
--- a/pkg/scheduler/plugins/elasticquota/core/group_quota_manager.go
+++ b/pkg/scheduler/plugins/elasticquota/core/group_quota_manager.go
@@ -66,7 +66,7 @@ type GroupQuotaManager struct {
 	hookPlugins []QuotaHookPlugin
 }
 
-func NewGroupQuotaManager(treeID string, systemGroupMax, defaultGroupMax v1.ResourceList) *GroupQuotaManager {
+func NewGroupQuotaManager(treeID string, enableMinQuotaScale bool, systemGroupMax, defaultGroupMax v1.ResourceList) *GroupQuotaManager {
 	quotaManager := &GroupQuotaManager{
 		totalResourceExceptSystemAndDefaultUsed: v1.ResourceList{},
 		totalResource:                           v1.ResourceList{},
@@ -90,7 +90,7 @@ func NewGroupQuotaManager(treeID string, systemGroupMax, defaultGroupMax v1.Reso
 	quotaManager.quotaInfoMap[extension.RootQuotaName] = rootQuotaInfo
 	quotaManager.quotaTopoNodeMap[extension.RootQuotaName] = NewQuotaTopoNode(extension.RootQuotaName, rootQuotaInfo)
 	quotaManager.runtimeQuotaCalculatorMap[extension.RootQuotaName] = NewRuntimeQuotaCalculator(extension.RootQuotaName)
-	quotaManager.setScaleMinQuotaEnabled(true)
+	quotaManager.setScaleMinQuotaEnabled(enableMinQuotaScale)
 	return quotaManager
 }
 
diff --git a/pkg/scheduler/plugins/elasticquota/plugin.go b/pkg/scheduler/plugins/elasticquota/plugin.go
index c0836e03..ddf81c9b 100644
--- a/pkg/scheduler/plugins/elasticquota/plugin.go
+++ b/pkg/scheduler/plugins/elasticquota/plugin.go
@@ -148,7 +148,7 @@ func New(args runtime.Object, handle framework.Handle) (framework.Plugin, error)
 		groupQuotaManagersForQuotaTree: make(map[string]*core.GroupQuotaManager),
 		quotaToTreeMap:                 make(map[string]string),
 	}
-	elasticQuota.groupQuotaManager = core.NewGroupQuotaManager("", pluginArgs.SystemQuotaGroupMax,
+	elasticQuota.groupQuotaManager = core.NewGroupQuotaManager("", pluginArgs.EnableMinQuotaScale, pluginArgs.SystemQuotaGroupMax,
 		pluginArgs.DefaultQuotaGroupMax)
 	err := elasticQuota.groupQuotaManager.InitHookPlugins(pluginArgs)
 	if err != nil {
diff --git a/pkg/scheduler/plugins/elasticquota/quota_handler.go b/pkg/scheduler/plugins/elasticquota/quota_handler.go
index 89b1bb47..3fc14d00 100644
--- a/pkg/scheduler/plugins/elasticquota/quota_handler.go
+++ b/pkg/scheduler/plugins/elasticquota/quota_handler.go
@@ -137,7 +137,7 @@ func (g *Plugin) ReplaceQuotas(objs []interface{}) error {
 	}()
 
 	g.groupQuotaManagersForQuotaTree = make(map[string]*core.GroupQuotaManager)
-	g.groupQuotaManager = core.NewGroupQuotaManager("", g.pluginArgs.SystemQuotaGroupMax,
+	g.groupQuotaManager = core.NewGroupQuotaManager("", g.pluginArgs.EnableMinQuotaScale, g.pluginArgs.SystemQuotaGroupMax,
 		g.pluginArgs.DefaultQuotaGroupMax)
 	err := g.groupQuotaManager.InitHookPlugins(g.pluginArgs)
 	if err != nil {
@@ -218,7 +218,7 @@ func (g *Plugin) GetOrCreateGroupQuotaManagerForTree(treeID string) *core.GroupQ
 	g.quotaManagerLock.Lock()
 	mgr, ok = g.groupQuotaManagersForQuotaTree[treeID]
 	if !ok {
-		mgr = core.NewGroupQuotaManager(treeID, g.pluginArgs.SystemQuotaGroupMax, g.pluginArgs.DefaultQuotaGroupMax)
+		mgr = core.NewGroupQuotaManager(treeID, g.pluginArgs.EnableMinQuotaScale, g.pluginArgs.SystemQuotaGroupMax, g.pluginArgs.DefaultQuotaGroupMax)
 		g.groupQuotaManagersForQuotaTree[treeID] = mgr
 		err := mgr.InitHookPlugins(g.pluginArgs)
 		if err != nil {



Test patch:
diff --git a/pkg/scheduler/plugins/elasticquota/core/group_quota_manager_test.go b/pkg/scheduler/plugins/elasticquota/core/group_quota_manager_test.go
index e142c91d..ef44e014 100644
--- a/pkg/scheduler/plugins/elasticquota/core/group_quota_manager_test.go
+++ b/pkg/scheduler/plugins/elasticquota/core/group_quota_manager_test.go
@@ -860,7 +860,7 @@ func TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota1(t *testin
 	assert.Equal(t, createResourceList(100, 100*GigaByte), quotaInfo.CalculateInfo.AutoScaleMin)
 }
 
-// TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota1 test scaledMinQuota when quotaGroup's sum of the
+// TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota2 test scaledMinQuota when quotaGroup's sum of the
 // minQuota is larger than totalRes, with one of the quotaGroup's request is zero.
 func TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota2(t *testing.T) {
 	gqm := NewGroupQuotaManagerForTest()
@@ -907,6 +907,36 @@ func TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota2(t *testin
 	assert.Equal(t, createResourceList2(66666, 200*GigaByte/3), quotaInfo.CalculateInfo.AutoScaleMin)
 }
 
+// TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota3 test scaledMinQuota is off when quotaGroup's sum of the
+// minQuota is larger than totalRes.
+func TestGroupQuotaManager_MultiUpdateQuotaRequest_WithScaledMinQuota3(t *testing.T) {
+	gqm := NewGroupQuotaManagerForTest()
+	gqm.scaleMinQuotaEnabled = false
+
+	AddQuotaToManager(t, gqm, "p", extension.RootQuotaName, 1000, 1000*GigaByte, 300, 300*GigaByte, true, true)
+	AddQuotaToManager(t, gqm, "a", "p", 1000, 1000*GigaByte, 100, 100*GigaByte, true, false)
+	AddQuotaToManager(t, gqm, "b", "p", 1000, 1000*GigaByte, 100, 100*GigaByte, true, false)
+	AddQuotaToManager(t, gqm, "c", "p", 1000, 1000*GigaByte, 100, 100*GigaByte, true, false)
+
+	request := createResourceList(200, 200*GigaByte)
+	gqm.updateGroupDeltaRequestNoLock("a", request, request, 0)
+	gqm.updateGroupDeltaRequestNoLock("b", request, request, 0)
+	gqm.updateGroupDeltaRequestNoLock("c", request, request, 0)
+
+	deltaRes := createResourceList(200, 200*GigaByte)
+	gqm.updateClusterTotalResourceNoLock(deltaRes)
+
+	assert.Equal(t, createResourceList(300, 300*GigaByte), gqm.RefreshRuntime("p"))
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.RefreshRuntime("a"))
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.RefreshRuntime("b"))
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.RefreshRuntime("c"))
+
+	assert.Equal(t, createResourceList(300, 300*GigaByte), gqm.GetQuotaInfoByName("p").CalculateInfo.AutoScaleMin)
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.GetQuotaInfoByName("a").CalculateInfo.AutoScaleMin)
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.GetQuotaInfoByName("b").CalculateInfo.AutoScaleMin)
+	assert.Equal(t, createResourceList(100, 100*GigaByte), gqm.GetQuotaInfoByName("c").CalculateInfo.AutoScaleMin)
+}
+
 func TestGroupQuotaManager_MultiUpdateQuotaUsedAndNonPreemptibleUsed(t *testing.T) {
 	gqm := NewGroupQuotaManagerForTest()
 
@@ -1772,7 +1802,7 @@ func TestGroupQuotaManager_OnTerminatingPodAdd(t *testing.T) {
 }
 
 func TestNewGroupQuotaManager(t *testing.T) {
-	gqm := NewGroupQuotaManager("", createResourceList(100, 100), createResourceList(300, 300))
+	gqm := NewGroupQuotaManager("", true, createResourceList(100, 100), createResourceList(300, 300))
 	assert.Equal(t, createResourceList(100, 100), gqm.GetQuotaInfoByName(extension.SystemQuotaName).GetMax())
 	assert.Equal(t, createResourceList(300, 300), gqm.GetQuotaInfoByName(extension.DefaultQuotaName).GetMax())
 	assert.True(t, gqm.scaleMinQuotaEnabled)
diff --git a/pkg/scheduler/plugins/elasticquota/core/hook_plugin_test.go b/pkg/scheduler/plugins/elasticquota/core/hook_plugin_test.go
index d32c27fd..a7f0e10a 100644
--- a/pkg/scheduler/plugins/elasticquota/core/hook_plugin_test.go
+++ b/pkg/scheduler/plugins/elasticquota/core/hook_plugin_test.go
@@ -113,7 +113,7 @@ func TestInitHookPlugins(t *testing.T) {
 
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
-			gqm := NewGroupQuotaManager("", nil, nil)
+			gqm := NewGroupQuotaManager("", true, nil, nil)
 			err := gqm.InitHookPlugins(tt.args)
 			if tt.expectedErr != nil {
 				assert.ErrorContains(t, err, tt.expectedErr.Error(), "Error message should match")
@@ -341,7 +341,7 @@ func initGQMForTesting(t *testing.T) *GroupQuotaManager {
 		},
 	}
 	// create a GroupQuotaManager with a mock hook
-	gqm := NewGroupQuotaManager("", nil, nil)
+	gqm := NewGroupQuotaManager("", true, nil, nil)
 	err := gqm.InitHookPlugins(pluginArgs)
 	assert.NoError(t, err)
 	return gqm