Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase k8s dependencies to 1.19-rc.2 #337

Merged
merged 4 commits into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.14
require (
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5
k8s.io/api v0.18.4
k8s.io/apimachinery v0.18.4
k8s.io/apiserver v0.18.4
k8s.io/client-go v0.18.4
k8s.io/code-generator v0.18.4
k8s.io/component-base v0.18.4
k8s.io/klog/v2 v2.0.0
k8s.io/api v0.19.0-rc.2
k8s.io/apimachinery v0.19.0-rc.2
k8s.io/apiserver v0.19.0-rc.2
k8s.io/client-go v0.19.0-rc.2
k8s.io/code-generator v0.19.0-rc.2
k8s.io/component-base v0.19.0-rc.2
k8s.io/klog/v2 v2.2.0
)
257 changes: 206 additions & 51 deletions go.sum

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions pkg/api/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package api
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"sigs.k8s.io/descheduler/pkg/descheduler/scheme"
)

var (
Expand All @@ -35,12 +33,6 @@ const GroupName = "descheduler"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

func init() {
if err := addKnownTypes(scheme.Scheme); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the addKnownTypes function(lines 46 to 51) is no longer called. So should the addKnownTypes function just be removed from this file too?

I also noticed that some other files have their own addKnownTypes functions, so maybe these should be cleaned up too?

I'm honestly not sure if these need to be cleaned up or not, but just wanted to point this out just in case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let me check these out. I think at least some of them can be removed if not all

Copy link
Contributor Author

@damemi damemi Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addKnownTypes is still used by the SchemeBuilder: https://github.com/kubernetes-sigs/descheduler/blob/72946602bbc51c3aee3fe438120040a04e53cbdb/pkg/api/register.go#L25f0456cede4d61f48e51015136685ba1dR25

The others in ComponentConfig aren't called, but I think I need to update those to manually invoke AddToScheme like I did here

panic(err)
}
}

// Kind takes an unqualified kind and returns a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
return SchemeGroupVersion.WithKind(kind).GroupKind()
Expand Down
8 changes: 0 additions & 8 deletions pkg/apis/componentconfig/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package componentconfig
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"sigs.k8s.io/descheduler/pkg/descheduler/scheme"
)

var (
Expand All @@ -34,12 +32,6 @@ const GroupName = "deschedulercomponentconfig"
// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

func init() {
if err := addKnownTypes(scheme.Scheme); err != nil {
panic(err)
}
}

// Kind takes an unqualified kind and returns a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
return SchemeGroupVersion.WithKind(kind).GroupKind()
Expand Down
13 changes: 13 additions & 0 deletions pkg/descheduler/scheme/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ package scheme
import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"sigs.k8s.io/descheduler/pkg/api"
"sigs.k8s.io/descheduler/pkg/api/v1alpha1"
"sigs.k8s.io/descheduler/pkg/apis/componentconfig"
componentconfigv1alpha1 "sigs.k8s.io/descheduler/pkg/apis/componentconfig/v1alpha1"
)

var (
Scheme = runtime.NewScheme()
Codecs = serializer.NewCodecFactory(Scheme)
)

func init() {
utilruntime.Must(api.AddToScheme(Scheme))
utilruntime.Must(v1alpha1.AddToScheme(Scheme))

utilruntime.Must(componentconfig.AddToScheme(Scheme))
utilruntime.Must(componentconfigv1alpha1.AddToScheme(Scheme))
}
12 changes: 12 additions & 0 deletions vendor/cloud.google.com/go/compute/metadata/.repo-metadata.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions vendor/cloud.google.com/go/compute/metadata/metadata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 31 additions & 4 deletions vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions vendor/github.com/Azure/go-autorest/autorest/adal/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions vendor/github.com/Azure/go-autorest/autorest/adal/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading