From b53a1cd2a50c40576d3ddc5af8815f649b9a91de Mon Sep 17 00:00:00 2001 From: toby Date: Mon, 3 Nov 2025 00:34:57 +0800 Subject: [PATCH 1/2] feat(go): add OIDC authentication plugin import --- native/internal/helm/helm.go | 1 + 1 file changed, 1 insertion(+) diff --git a/native/internal/helm/helm.go b/native/internal/helm/helm.go index fd662472..37b58ee8 100644 --- a/native/internal/helm/helm.go +++ b/native/internal/helm/helm.go @@ -23,6 +23,7 @@ import ( "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/plugin/pkg/client/auth/oidc" "os" "strings" "time" From c9500d5bf447fc4821c1a125050b90bd2b85b993 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 13 Nov 2025 16:14:05 +0100 Subject: [PATCH 2/2] feat(go): add all auth plugins --- native/internal/helm/helm.go | 8 ++++---- native/internal/helm/plugins.go | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 native/internal/helm/plugins.go diff --git a/native/internal/helm/helm.go b/native/internal/helm/helm.go index 37b58ee8..56418f1a 100644 --- a/native/internal/helm/helm.go +++ b/native/internal/helm/helm.go @@ -20,14 +20,14 @@ import ( "bytes" "fmt" "io" - "k8s.io/cli-runtime/pkg/genericclioptions" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/plugin/pkg/client/auth/oidc" "os" "strings" "time" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "github.com/pkg/errors" "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart" diff --git a/native/internal/helm/plugins.go b/native/internal/helm/plugins.go new file mode 100644 index 00000000..f7ddbd06 --- /dev/null +++ b/native/internal/helm/plugins.go @@ -0,0 +1,22 @@ +/* + * Copyright 2024 Marc Nuri + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package helm + +import _ "k8s.io/client-go/plugin/pkg/client/auth/azure" +import _ "k8s.io/client-go/plugin/pkg/client/auth/exec" +import _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" +import _ "k8s.io/client-go/plugin/pkg/client/auth/oidc"