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

Feat/allow k8s auth for all providers in examples #67

Conversation

snebel29
Copy link
Contributor

@snebel29 snebel29 commented Apr 8, 2019

Hi,
When running the examples you will get No Auth Provider found errors if your kubeconfig uses providers such as gcp or azure to name two.

$ make controller-example-onefile
go run ./examples/onefile-echo-pod-controller/main.go --development
2019/04/08 11:51:39 [ERROR] error creating kubernetes client: No Auth Provider found for name "gcp"
exit status 1
make: *** [controller-example-onefile] Error 1

The idea is to register all of the auth packages as well, and make examples to just work with a broader variety of authentication methods, out of the box.

$ make controller-example-onefile
go run ./examples/onefile-echo-pod-controller/main.go --development
go: finding github.com/Azure/go-autorest bca49d5b51a50dc5bb17bbf6204c711c6dbded06
2019/04/08 11:59:38 [WARN] no metrics recorder specified, disabling metrics
2019/04/08 11:59:38 [WARN] controller name not provided, it should have a name, fallback name to: *handler.HandlerFunc
2019/04/08 11:59:38 [INFO] starting controller
2019/04/08 11:59:40 [INFO] Pod added: kube-system/metadata-agent-5xcvk
...
...

I hope this change makes sense.

P.D: I had to force github.com/Azure/go-autorest to v10.14.0 as per explained here

Thanks

@snebel29 snebel29 requested review from ese and slok as code owners April 8, 2019 11:11
@slok
Copy link
Collaborator

slok commented Apr 11, 2019

Hi @snebel29!

Indeed it makes sense, thanks for contributing!

@slok slok merged commit d9e5da7 into spotahome:master Apr 11, 2019
@snebel29 snebel29 deleted the feat/allow-k8s-auth-for-all-providers-in-examples branch April 11, 2019 08:08
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 this pull request may close these issues.

2 participants