switch system priority class to versioned (v1) api

move all the helpers to scheduling v1 helpers

less explicit conversion
This commit is contained in:
yue9944882
2019-04-10 13:10:09 +08:00
parent ea4570a412
commit 09cf42d67c
14 changed files with 60 additions and 54 deletions

View File

@@ -22,10 +22,11 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/kubernetes/pkg/apis/scheduling"
schedulingapiv1 "k8s.io/kubernetes/pkg/apis/scheduling/v1"
)
func TestValidatePriorityClass(t *testing.T) {
spcs := scheduling.SystemPriorityClasses()
spcs := schedulingapiv1.SystemPriorityClasses()
successCases := map[string]scheduling.PriorityClass{
"no description": {
ObjectMeta: metav1.ObjectMeta{Name: "tier1", Namespace: ""},