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

client-go: don't import client auth provider packages #41532

Merged
merged 2 commits into from
Feb 22, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/kubectl/app/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ go_library(
"//pkg/kubectl/cmd/util:go_default_library",
"//pkg/util/logs:go_default_library",
"//pkg/version/prometheus:go_default_library",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
],
)

Expand Down
1 change: 1 addition & 0 deletions cmd/kubectl/app/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package app
import (
"os"

_ "k8s.io/client-go/plugin/pkg/client/auth" // kubectl auth providers.
_ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration
"k8s.io/kubernetes/pkg/kubectl/cmd"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) {
}
imports = append(imports, "github.com/golang/glog")
imports = append(imports, "k8s.io/client-go/util/flowcontrol")
// import solely to initialize client auth plugins.
imports = append(imports, "_ \"k8s.io/client-go/plugin/pkg/client/auth\"")
return
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ go_library(
"//cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package test_internalclientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
internalversiontestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/internalversion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ go_library(
"//federation/client/clientset_generated/federation_clientset/typed/federation/v1beta1:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package federation_clientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
v1autoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_clientset/typed/autoscaling/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ go_library(
"//federation/client/clientset_generated/federation_internalclientset/typed/federation/internalversion:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package federation_internalclientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
internalversionautoscaling "k8s.io/kubernetes/federation/client/clientset_generated/federation_internalclientset/typed/autoscaling/internalversion"
Expand Down
1 change: 0 additions & 1 deletion pkg/client/clientset_generated/clientset/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ go_library(
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down
1 change: 0 additions & 1 deletion pkg/client/clientset_generated/clientset/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package clientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
v1beta1apps "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"
Expand Down
1 change: 0 additions & 1 deletion pkg/client/clientset_generated/internalclientset/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ go_library(
"//pkg/client/clientset_generated/internalclientset/typed/storage/internalversion:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package internalclientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
internalversionapps "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/apps/internalversion"
Expand Down
2 changes: 0 additions & 2 deletions staging/src/k8s.io/client-go/discovery/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
apimachineryversion "k8s.io/apimachinery/pkg/version"
// Import solely to initialize client auth plugins.
_ "k8s.io/client-go/plugin/pkg/client/auth"
)

// MatchesServerVersion queries the server to compares the build version
Expand Down
1 change: 0 additions & 1 deletion staging/src/k8s.io/client-go/kubernetes/clientset.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
v1alpha1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
v1beta1rbac "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
v1beta1storage "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is generated, compare

imports = append(imports, "_ \"k8s.io/client-go/plugin/pkg/client/auth\"")

Copy link
Contributor

Choose a reason for hiding this comment

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

I.e. please change the generator.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

Copy link
Member

Choose a reason for hiding this comment

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

Nice catch!

"k8s.io/client-go/util/flowcontrol"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package clientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
v1alpha1apiregistration "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package internalclientset
import (
"github.com/golang/glog"
discovery "k8s.io/client-go/discovery"
_ "k8s.io/client-go/plugin/pkg/client/auth"
rest "k8s.io/client-go/rest"
"k8s.io/client-go/util/flowcontrol"
internalversionapiregistration "k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion"
Expand Down
4 changes: 0 additions & 4 deletions vendor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12985,7 +12985,6 @@ go_library(
"//vendor:k8s.io/apimachinery/pkg/version",
"//vendor:k8s.io/client-go/pkg/api",
"//vendor:k8s.io/client-go/pkg/api/v1",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
],
)
Expand Down Expand Up @@ -13575,7 +13574,6 @@ go_library(
"//vendor:k8s.io/client-go/pkg/apis/policy/install",
"//vendor:k8s.io/client-go/pkg/apis/rbac/install",
"//vendor:k8s.io/client-go/pkg/apis/storage/install",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
],
Expand Down Expand Up @@ -16585,7 +16583,6 @@ go_library(
deps = [
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
"//vendor:k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1alpha1",
Expand Down Expand Up @@ -16664,7 +16661,6 @@ go_library(
deps = [
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/client-go/discovery",
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
"//vendor:k8s.io/client-go/rest",
"//vendor:k8s.io/client-go/util/flowcontrol",
"//vendor:k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/typed/apiregistration/internalversion",
Expand Down