Skip to content

Commit

Permalink
Merge pull request #179 from adrienjt/different-default-priority
Browse files Browse the repository at this point in the history
Different default priority
  • Loading branch information
adrienjt committed Jul 7, 2023
2 parents cc50a8c + e6e8b14 commit fa81d34
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
14 changes: 7 additions & 7 deletions pkg/generated/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions pkg/generated/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pkg/model/delegatepod/model.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 The Multicluster-Scheduler Authors.
* Copyright 2023 The Multicluster-Scheduler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -78,6 +78,9 @@ func MakeDelegatePod(proxyPod *corev1.Pod) (*v1alpha1.PodChaperon, error) {
delegatePod.Spec.SchedulerName = common.CandidateSchedulerName
}

// support different default priority in target cluster
delegatePod.Spec.Priority = nil

return delegatePod, nil
}

Expand Down
5 changes: 4 additions & 1 deletion test/e2e/e2e.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# Copyright 2022 The Multicluster-Scheduler Authors.
# Copyright 2023 The Multicluster-Scheduler Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,6 +65,9 @@ webhook_ready 1 admiralty multicluster-scheduler-controller-manager multicluster
# unfortunately, we can't use kubectl to taint nodes with node.kubernetes.io/network-unavailable
# some system defaulting admission controller overwriting the reserved taint?

# fix GH issue #152: different default priority in target cluster
k 2 apply -f test/e2e/priorityclass.yaml

argo_test 1 2
follow_test 1 2
logs_test 1 2
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/priorityclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: default
value: 1000
globalDefault: true

0 comments on commit fa81d34

Please sign in to comment.