Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Not works with kubectl 1.23.5 #40

Closed
STRRL opened this issue Apr 18, 2022 · 1 comment · Fixed by #41
Closed

Not works with kubectl 1.23.5 #40

STRRL opened this issue Apr 18, 2022 · 1 comment · Fixed by #41

Comments

@STRRL
Copy link
Contributor

STRRL commented Apr 18, 2022

Description

Provide a clear and concise description of the issue, including what you expected to happen.

k8s-pixy-auth does not work well with kubectl 1.23.5.

Reproduction

Detail the steps taken to reproduce this error, what was expected, and whether this issue can be reproduced consistently or if it is intermittent.

Where applicable, please include:

  • Code sample to reproduce the issue
  • Log files (redact/remove sensitive information)
  • Application settings (redact/remove sensitive information)
  • Screenshots

Following https://github.com/auth0/k8s-pixy-auth/blob/master/docs/Auth0Setup.md, but with the latest minikube (version v1.25.2)

When I execute k8s-pixy-auth init xxxxxx, it reports:

./k8s-pixy-auth init --context-name "minikube" --issuer-endpoint "https://xxx.auth0.com/" --audience "xxx-self-hosted-cluster" --client-id "<CLIENT ID>"
Installing binary...
Updating kube config...
panic: Error saving kube config: converting  to : type names don't match (Unknown, RawExtension), and no conversion 'func (runtime.Unknown, runtime.RawExtension) error' registered.

goroutine 1 [running]:
github.com/auth0/k8s-pixy-auth/cmd.glob..func2(0xe87fe0?, {0xa275de?, 0x8?, 0x8?})
        /home/strrl/playground/github/k8s-pixy-auth/cmd/init.go:39 +0x253
github.com/spf13/cobra.(*Command).execute(0xe87fe0, {0xc000168780, 0x8, 0x8})
        /home/strrl/.gvm/pkgsets/go1.18/global/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xe88240)
        /home/strrl/.gvm/pkgsets/go1.18/global/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2dc
github.com/spf13/cobra.(*Command).Execute(...)
        /home/strrl/.gvm/pkgsets/go1.18/global/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/auth0/k8s-pixy-auth/cmd.Execute()
        /home/strrl/playground/github/k8s-pixy-auth/cmd/root.go:36 +0x25
main.main()
        /home/strrl/playground/github/k8s-pixy-auth/main.go:8 +0x17

But I found a possible solution:

I tried to upgrade the dependency of client-go to v0.23.1, it just works. :D

Environment

Please provide the following:

  • Version of this library used:

Both master and v0.4.0

  • Version of the platform or framework used, if applicable:
$ minikube version  
minikube version: v1.25.2
commit: 362d5fdc0a3dbee389b3d3f1034e8023e72bd3a7-dirty

$ kubectl version                                                                                              
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"archive", BuildDate:"2022-03-17T21:14:47Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3", GitCommit:"816c97ab8cff8a1c72eccca1026f7820e93e0d25", GitTreeState:"clean", BuildDate:"2022-01-25T21:19:12Z", GoVersion:"go1.17.6", Compiler:"gc", Platform:"linux/amd64"}
  • Other relevant versions (language, server software, OS, browser):
  • Other modules/plugins/libraries that might be involved:
@STRRL
Copy link
Contributor Author

STRRL commented Apr 18, 2022

This issue mostly relates to kubernetes/minikube#10859. And library client-go < 0.17.x would meet this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant