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]>
  • Loading branch information
Iceber committed Apr 29, 2024
1 parent 316fc57 commit 5d3a524
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/scheme/import_known_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ import (
_ "k8s.io/kubernetes/pkg/apis/resource/install"
_ "k8s.io/kubernetes/pkg/apis/scheduling/install"
_ "k8s.io/kubernetes/pkg/apis/storage/install"

Check failure on line 30 in pkg/scheme/import_known_versions.go

View workflow job for this annotation

GitHub Actions / Lint with golangci-lint

File is not `gci`-ed with --skip-generated -s Standard -s Default -s Prefix(github.com/clusterpedia-io) (gci)
// nolint:gci
// Fix the version order of 'discovery.k8s.io' resources
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
v1 "k8s.io/kubernetes/pkg/apis/discovery/v1"
"k8s.io/kubernetes/pkg/apis/discovery/v1beta1"
)

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 5d3a524

Please sign in to comment.