Skip to content

Commit

Permalink
test: add metrics e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mykysha committed Jan 9, 2025
1 parent bf4657a commit 9f77094
Show file tree
Hide file tree
Showing 7 changed files with 530 additions and 32 deletions.
7 changes: 4 additions & 3 deletions pkg/controller/core/localqueue_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func (r *LocalQueueReconciler) Update(e event.UpdateEvent) bool {
log := r.log.WithValues("localQueue", klog.KObj(newLq))
log.V(2).Info("Queue update event")

if features.Enabled(features.LocalQueueMetrics) {
updateLocalQueueResourceMetrics(newLq)
}

oldStopPolicy := ptr.Deref(oldLq.Spec.StopPolicy, kueue.None)
newStopPolicy := ptr.Deref(newLq.Spec.StopPolicy, kueue.None)

Expand All @@ -207,9 +211,6 @@ func (r *LocalQueueReconciler) Update(e event.UpdateEvent) bool {
}

r.queues.DeleteLocalQueue(oldLq)
if features.Enabled(features.LocalQueueMetrics) {
updateLocalQueueResourceMetrics(newLq)
}

return true
}
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/config/common/controller_manager_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
apiVersion: config.kueue.x-k8s.io/v1beta1
kind: Configuration
metrics:
enableClusterQueueResources: true
leaderElection:
leaderElect: true
controller:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/config/common/manager_e2e_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
value: IfNotPresent
- op: add
path: /spec/template/spec/containers/0/args/-
value: --feature-gates=MultiKueueBatchJobWithManagedBy=true,TopologyAwareScheduling=true
value: --feature-gates=MultiKueueBatchJobWithManagedBy=true,TopologyAwareScheduling=true,LocalQueueMetrics=true
Loading

0 comments on commit 9f77094

Please sign in to comment.