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

vsub error no Auth Provider found for name "oidc" #3991

Open
jjuliogallegos01 opened this issue Jan 30, 2025 · 1 comment
Open

vsub error no Auth Provider found for name "oidc" #3991

jjuliogallegos01 opened this issue Jan 30, 2025 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jjuliogallegos01
Copy link

Description

When having an auth-provider odic, vsub fails as follows:

./vsub --command "sleep 1000" -n test7
panic: no Auth Provider found for name "oidc"

goroutine 1 [running]:
volcano.sh/apis/pkg/client/clientset/versioned.NewForConfigOrDie(...)
	/home/juliogallegos/go/pkg/mod/volcano.sh/[email protected]/pkg/client/clientset/versioned/clientset.go:155
volcano.sh/volcano/pkg/cli/vsub.RunJob({0x199cf58, 0x25839c0})
	/home/juliogallegos/git/volcano/pkg/cli/vsub/run.go:151 +0x272
main.main.func1(0xc00026e008, {0x17315dc?, 0x4?, 0x17315e0?})
	/home/juliogallegos/git/volcano/cmd/cli/vsub/main.go:34 +0x29
github.com/spf13/cobra.(*Command).execute(0xc00026e008, {0xc000148010, 0x4, 0x4})
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc00026e008)
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
k8s.io/component-base/cli.run(0xc00026e008)
	/home/juliogallegos/go/pkg/mod/k8s.io/[email protected]/cli/run.go:146 +0x290
k8s.io/component-base/cli.Run(0xc00026e008?)
	/home/juliogallegos/go/pkg/mod/k8s.io/[email protected]/cli/run.go:46 +0x17
main.main()
	/home/juliogallegos/git/volcano/cmd/cli/vsub/main.go:41 +0x105

Steps to reproduce the issue

  1. create an authentication configuration based on auth-provider oidc
  2. submit a job with the command line "vsub"

Describe the results you received and expected

we get the following exception:

./vsub --command "sleep 1000" -n test7
panic: no Auth Provider found for name "oidc"

goroutine 1 [running]:
volcano.sh/apis/pkg/client/clientset/versioned.NewForConfigOrDie(...)
	/home/juliogallegos/go/pkg/mod/volcano.sh/[email protected]/pkg/client/clientset/versioned/clientset.go:155
volcano.sh/volcano/pkg/cli/vsub.RunJob({0x199cf58, 0x25839c0})
	/home/juliogallegos/git/volcano/pkg/cli/vsub/run.go:151 +0x272
main.main.func1(0xc000330308, {0x17315dc?, 0x4?, 0x17315e0?})
	/home/juliogallegos/git/volcano/cmd/cli/vsub/main.go:34 +0x29
github.com/spf13/cobra.(*Command).execute(0xc000330308, {0xc000148010, 0x4, 0x4})
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xc000330308)
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	/home/juliogallegos/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
k8s.io/component-base/cli.run(0xc000330308)
	/home/juliogallegos/go/pkg/mod/k8s.io/[email protected]/cli/run.go:146 +0x290
k8s.io/component-base/cli.Run(0xc000330308?)
	/home/juliogallegos/go/pkg/mod/k8s.io/[email protected]/cli/run.go:46 +0x17
main.main()
	/home/juliogallegos/git/volcano/cmd/cli/vsub/main.go:41 +0x105

The expected result is a successful job submitted

What version of Volcano are you using?

1.10

Any other relevant information

I already have a fix:

adding the following import to the file cmd/cli/vsub/main.go fixes the issue:

_ "k8s.io/client-go/plugin/pkg/client/auth/oidc" on line 22.

@jjuliogallegos01 jjuliogallegos01 added the kind/bug Categorizes issue or PR as related to a bug. label Jan 30, 2025
@Monokaix
Copy link
Member

Monokaix commented Feb 5, 2025

Yeah you're right, you can refer to #3663 to import "_ k8s.io/client-go/plugin/pkg/client/auth" directly and please feel free to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants