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

Support oidc auth provider in kubeconfig #115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

databus23
Copy link

@databus23 databus23 commented Apr 17, 2023

This awesome plugin does not work for our kubeconfigs which rely on oidc as the auth provider:

> helm mapkubeapis --mapfile $HOME/.kube/fix-cert-manager-api.yaml galvani --dry-run
2023/04/17 12:09:56 NOTE: This is in dry-run mode, the following actions will not be executed.
2023/04/17 12:09:56 Run without --dry-run to take the actions described below:
2023/04/17 12:09:56
2023/04/17 12:09:56 Release 'galvani' will be checked for deprecated or removed Kubernetes APIs and will be updated if necessary to supported API versions.
2023/04/17 12:09:56 Get release 'galvani' latest version.
Error: failed to get release 'galvani' latest version: query: failed to query with labels: no Auth Provider found for name "oidc"
Error: plugin "mapkubeapis" exited with error

Fixes #113

@metajiji
Copy link

Any news?

Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

Thanks @databus23 for pushing the fix. Suggestion in line.

Do you mind add adding to the description that this closes #113?

Comment on lines 34 to 37
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
// Enable usage of the following providers
_ "k8s.io/client-go/plugin/pkg/client/auth/azure"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"

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

Successfully merging this pull request may close these issues.

No Auth Provider Found
3 participants