Skip to content

Commit

Permalink
Merge pull request #660 from Iceber/fix_discovery_prioritized_version…
Browse files Browse the repository at this point in the history
…s_0.8.0

[release/0.8] fix the version order of 'discovery.k8s.io'
  • Loading branch information
Iceber authored Apr 29, 2024
2 parents 147bc58 + df0c16e commit 12744a1
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 12744a1

Please sign in to comment.