File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -1270,15 +1270,21 @@ func (qjm *XController) ScheduleNext() {
1270
1270
// All non-quota submission AWs will consume quota from default node.
1271
1271
1272
1272
//Find if AW has label named "quota_context"
1273
- allLabels := qj .Labels
1273
+ allLabels := qj .DeepCopy (). Labels
1274
1274
quotaSetForAw := false
1275
1275
for labelk , _ := range allLabels {
1276
1276
if labelk == "quota_context" {
1277
1277
quotaSetForAw = true
1278
1278
}
1279
1279
}
1280
+ //When label "quota_context" not found add it
1281
+ //this will only work for quota tree and not quota forest
1280
1282
if quotaSetForAw == false {
1281
- qj .Labels ["quota_context" ] = "default"
1283
+ if len (allLabels ) == 0 {
1284
+ allLabels = make (map [string ]string )
1285
+ }
1286
+ allLabels ["quota_context" ] = "default"
1287
+ qj .SetLabels (allLabels )
1282
1288
if err := qjm .updateEtcd (qj , "ScheduleNext - setDefaultQuota" ); err == nil {
1283
1289
klog .V (3 ).Infof ("[ScheduleNext] Default quota added to AW %v" , qj .Name )
1284
1290
}
Original file line number Diff line number Diff line change 53
53
quotas :
54
54
hardLimit : true
55
55
requests :
56
+ <<<<<<< HEAD:test/e2e-kuttl/install-quota-subtree.yaml
56
57
cpu : 900m
57
- memory : 300Mi
58
+ memory : 300Mi
59
+ =======
60
+ cpu : 900
61
+ memory : 300
62
+ - name : default
63
+ quotas :
64
+ hardLimit : true
65
+ requests :
66
+ cpu : 1075
67
+ memory : 1045
68
+ >>>>>>> 9c356c9f (add default quota):test/e2e-kuttl/quota-forest/01-install.yaml
You can’t perform that action at this time.
0 commit comments