Skip to content

Commit df0c16e

Browse files
committed
fix the version order of 'discovery.k8s.io'
Signed-off-by: Iceber Gu <[email protected]> (cherry picked from commit 4297e74) Signed-off-by: Iceber Gu <[email protected]>
1 parent 147bc58 commit df0c16e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/scheme/import_known_versions.go

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package scheme
33
import (
44
// These imports are the API groups the API server will support.
55
apiextensionsinstall "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install"
6+
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
67
apiregistrationinstall "k8s.io/kube-aggregator/pkg/apis/apiregistration/install"
78
_ "k8s.io/kubernetes/pkg/apis/admission/install"
89
_ "k8s.io/kubernetes/pkg/apis/admissionregistration/install"
@@ -16,6 +17,8 @@ import (
1617
_ "k8s.io/kubernetes/pkg/apis/coordination/install"
1718
_ "k8s.io/kubernetes/pkg/apis/core/install"
1819
_ "k8s.io/kubernetes/pkg/apis/discovery/install"
20+
v1 "k8s.io/kubernetes/pkg/apis/discovery/v1"
21+
"k8s.io/kubernetes/pkg/apis/discovery/v1beta1"
1922
_ "k8s.io/kubernetes/pkg/apis/events/install"
2023
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
2124
_ "k8s.io/kubernetes/pkg/apis/flowcontrol/install"
@@ -32,4 +35,7 @@ import (
3235
func init() {
3336
apiextensionsinstall.Install(LegacyResourceScheme)
3437
apiregistrationinstall.Install(LegacyResourceScheme)
38+
39+
// Fix the version order of 'discovery.k8s.io' resources
40+
utilruntime.Must(LegacyResourceScheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion))
3541
}

0 commit comments

Comments
 (0)