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

discovery: don't import client auth provider plugins #49

Closed
ericchiang opened this issue Dec 2, 2016 · 2 comments · Fixed by kubernetes/kubernetes#41532
Closed

discovery: don't import client auth provider plugins #49

ericchiang opened this issue Dec 2, 2016 · 2 comments · Fixed by kubernetes/kubernetes#41532

Comments

@ericchiang
Copy link
Contributor

ericchiang commented Dec 2, 2016

Import statement here[0].

I maintain the OIDC auth plugin, and I don't think they're useful for most clients, and it has a pretty big dependency footprint.

Can we document which empty imports you need to use to get oidc or gce support instead of importing these by default? Happy to open this same issue in the Kubernetes repo if that's where it needs to be addressed.

[0]

_ "k8s.io/client-go/plugin/pkg/client/auth"

@caesarxuchao
Copy link
Member

We should address it in the main repo?

Are you suggesting we should remove the import statement[0], and adds a doc telling people to how to install oidc or gce?

@ericchiang
Copy link
Contributor Author

Are you suggesting we should remove the import statement[0], and adds a doc telling people to how to install oidc or gce?

Yes. I'll open the issue in the main repo.

k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Feb 22, 2017
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

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

Both of these auth providers are useful for kubectl but not so much for everyone importing client-go. Let users optionally import them (example [0]) and reduce the overall number of imports that client-go requires.

Quick grep seems to imply it wont import it after.

```
$ grep -r 'client-go/plugin/pkg/client/auth' staging/
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
staging/src/k8s.io/client-go/examples/third-party-resources/main.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
```

closes kubernetes/client-go#49
updates kubernetes/client-go#79 (removes cloud.google.com/go import)

cc @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-auth-pr-reviews 

```release-notes
client-go no longer imports GCP OAuth2 and OpenID Connect packages by default.
```

[0] https://github.com/kubernetes/client-go/blob/8b466d64c5da37e0d3985b907d812e1f58cb41cb/examples/third-party-resources/main.go#L34-L35
perotinus pushed a commit to kubernetes-retired/cluster-registry that referenced this issue Sep 2, 2017
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

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

Both of these auth providers are useful for kubectl but not so much for everyone importing client-go. Let users optionally import them (example [0]) and reduce the overall number of imports that client-go requires.

Quick grep seems to imply it wont import it after.

```
$ grep -r 'client-go/plugin/pkg/client/auth' staging/
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
staging/src/k8s.io/client-go/examples/third-party-resources/main.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
```

closes kubernetes/client-go#49
updates kubernetes/client-go#79 (removes cloud.google.com/go import)

cc @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-auth-pr-reviews 

```release-notes
client-go no longer imports GCP OAuth2 and OpenID Connect packages by default.
```

[0] https://github.com/kubernetes/client-go/blob/8b466d64c5da37e0d3985b907d812e1f58cb41cb/examples/third-party-resources/main.go#L34-L35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants