Skip to content

Commit

Permalink
fix: schedule initial workload and filter on worker nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanad committed Jan 3, 2025
1 parent 68f7748 commit 09a0f1d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions test/e2e/plugin-config-scoring-strategy/init-workload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Pod
metadata:
name: init-workload
annotations:
multicluster.admiralty.io/elect: ""
spec:
containers:
- name: pause
image: gcr.io/google_containers/pause
resources:
requests:
cpu: 1
7 changes: 5 additions & 2 deletions test/e2e/plugin-config-scoring-strategy/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ plugin-config-scoring-strategy_test() {
j=$2
k $j label node --all a=b --overwrite

# Find the node with the highest CPU utilization
nodes=$(k $j get nodes -o name | sed s/"node\/"//)
k $i apply -f test/e2e/plugin-config-scoring-strategy/init-workload.yaml
k $i wait pod init-workload --for=condition=PodScheduled

# Find the worker node with the highest CPU utilization
nodes=$(k $j get nodes -l '!node-role.kubernetes.io/control-plane' -o name | sed s/"node\/"//)
most_allocated=""
most_cpu_requests="0"
for node in $nodes; do
Expand Down

0 comments on commit 09a0f1d

Please sign in to comment.