File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
test/e2e-kuttl/quota-forest Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -1261,15 +1261,21 @@ func (qjm *XController) ScheduleNext() {
1261
1261
// All non-quota submission AWs will consume quota from default node.
1262
1262
1263
1263
//Find if AW has label named "quota_context"
1264
- allLabels := qj .Labels
1264
+ allLabels := qj .DeepCopy (). Labels
1265
1265
quotaSetForAw := false
1266
1266
for labelk , _ := range allLabels {
1267
1267
if labelk == "quota_context" {
1268
1268
quotaSetForAw = true
1269
1269
}
1270
1270
}
1271
+ //When label "quota_context" not found add it
1272
+ //this will only work for quota tree and not quota forest
1271
1273
if quotaSetForAw == false {
1272
- qj .Labels ["quota_context" ] = "default"
1274
+ if len (allLabels ) == 0 {
1275
+ allLabels = make (map [string ]string )
1276
+ }
1277
+ allLabels ["quota_context" ] = "default"
1278
+ qj .SetLabels (allLabels )
1273
1279
if err := qjm .updateEtcd (qj , "ScheduleNext - setDefaultQuota" ); err == nil {
1274
1280
klog .V (3 ).Infof ("[ScheduleNext] Default quota added to AW %v" , qj .Name )
1275
1281
}
Original file line number Diff line number Diff line change 54
54
hardLimit : true
55
55
requests :
56
56
cpu : 900
57
- memory : 300
57
+ memory : 300
58
+ - name : default
59
+ quotas :
60
+ hardLimit : true
61
+ requests :
62
+ cpu : 1075
63
+ memory : 1045
You can’t perform that action at this time.
0 commit comments