Skip to content

Support oidc auth provider in kubeconfig#115

Open
databus23 wants to merge 1 commit intohelm:mainfrom
databus23:patch-1
Open

Support oidc auth provider in kubeconfig#115
databus23 wants to merge 1 commit intohelm:mainfrom
databus23:patch-1

Conversation

@databus23
Copy link
Copy Markdown

@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

Signed-off-by: Fabian Ruff <fabian.ruff@sap.com>
@metajiji
Copy link
Copy Markdown

Any news?

Copy link
Copy Markdown
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 thread pkg/common/utils.go
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
Copy Markdown
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"

@jhohertz
Copy link
Copy Markdown

This clearly needs to be applied.

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

4 participants