mirror of https://github.com/k3s-io/k3s
Merge pull request #54691 from wackxu/priadm
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. update wrong group for priorityclasses **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54690 **Special notes for your reviewer**: assgin @bsalamat **Release note**: ```release-note NONE ```pull/6/head
commit
9c35982e1a
|
@ -96,7 +96,7 @@ func (p *priorityPlugin) SetInternalKubeInformerFactory(f informers.SharedInform
|
|||
|
||||
var (
|
||||
podResource = api.Resource("pods")
|
||||
priorityClassResource = api.Resource("priorityclasses")
|
||||
priorityClassResource = scheduling.Resource("priorityclasses")
|
||||
)
|
||||
|
||||
// Admit checks Pods and PriorityClasses and admits or rejects them. It also resolves the priority of pods based on their PriorityClass.
|
||||
|
|
|
@ -139,10 +139,10 @@ func TestPriorityClassAdmission(t *testing.T) {
|
|||
attrs := admission.NewAttributesRecord(
|
||||
test.newClass,
|
||||
nil,
|
||||
api.Kind("PriorityClass").WithVersion("version"),
|
||||
scheduling.Kind("PriorityClass").WithVersion("version"),
|
||||
"",
|
||||
"",
|
||||
api.Resource("priorityclasses").WithVersion("version"),
|
||||
scheduling.Resource("priorityclasses").WithVersion("version"),
|
||||
"",
|
||||
admission.Create,
|
||||
nil,
|
||||
|
@ -160,8 +160,8 @@ func TestPriorityClassAdmission(t *testing.T) {
|
|||
|
||||
// TestDefaultPriority tests that default priority is resolved correctly.
|
||||
func TestDefaultPriority(t *testing.T) {
|
||||
pcResource := api.Resource("priorityclasses").WithVersion("version")
|
||||
pcKind := api.Kind("PriorityClass").WithVersion("version")
|
||||
pcResource := scheduling.Resource("priorityclasses").WithVersion("version")
|
||||
pcKind := scheduling.Kind("PriorityClass").WithVersion("version")
|
||||
updatedDefaultClass1 := *defaultClass1
|
||||
updatedDefaultClass1.GlobalDefault = false
|
||||
|
||||
|
|
Loading…
Reference in New Issue