Skip to content

Commit

Permalink
fix the version order of 'discovery.k8s.io'
Browse files Browse the repository at this point in the history
Signed-off-by: Iceber Gu <[email protected]>
(cherry picked from commit 4297e74)
Signed-off-by: Iceber Gu <[email protected]>
  • Loading branch information
Iceber committed Apr 29, 2024
1 parent 147bc58 commit df0c16e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/scheme/import_known_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package scheme
import (
// These imports are the API groups the API server will support.
apiextensionsinstall "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
apiregistrationinstall "k8s.io/kube-aggregator/pkg/apis/apiregistration/install"
_ "k8s.io/kubernetes/pkg/apis/admission/install"
_ "k8s.io/kubernetes/pkg/apis/admissionregistration/install"
Expand All @@ -16,6 +17,8 @@ import (
_ "k8s.io/kubernetes/pkg/apis/coordination/install"
_ "k8s.io/kubernetes/pkg/apis/core/install"
_ "k8s.io/kubernetes/pkg/apis/discovery/install"
v1 "k8s.io/kubernetes/pkg/apis/discovery/v1"
"k8s.io/kubernetes/pkg/apis/discovery/v1beta1"
_ "k8s.io/kubernetes/pkg/apis/events/install"
_ "k8s.io/kubernetes/pkg/apis/extensions/install"
_ "k8s.io/kubernetes/pkg/apis/flowcontrol/install"
Expand All @@ -32,4 +35,7 @@ import (
func init() {
apiextensionsinstall.Install(LegacyResourceScheme)
apiregistrationinstall.Install(LegacyResourceScheme)

// Fix the version order of 'discovery.k8s.io' resources
utilruntime.Must(LegacyResourceScheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion))
}

0 comments on commit df0c16e

Please sign in to comment.