diff --git a/cmd/cli/plugin/cluster/kubeconfig_get.go b/cmd/cli/plugin/cluster/kubeconfig_get.go index f10d995c7d..e106017273 100644 --- a/cmd/cli/plugin/cluster/kubeconfig_get.go +++ b/cmd/cli/plugin/cluster/kubeconfig_get.go @@ -102,8 +102,12 @@ func getPinnipedKubeconfig(tkgctlClient tkgctl.TKGClient, workloadClusterName st audience = *clusterPinnipedInfo.ClusterAudience } - kubeconfig, err := pinnipedkubeconfig.GetPinnipedKubeconfig(clusterPinnipedInfo.ClusterInfo, clusterPinnipedInfo.PinnipedInfo, - clusterPinnipedInfo.ClusterName, audience) + kubeconfig, err := pinnipedkubeconfig.GetPinnipedKubeconfig( + clusterPinnipedInfo.ClusterInfo, + clusterPinnipedInfo.PinnipedInfo, + clusterPinnipedInfo.ClusterName, + audience, + ) if err != nil { return errors.Wrap(err, "unable to get kubeconfig") diff --git a/cmd/cli/plugin/login/main.go b/cmd/cli/plugin/login/main.go index d0ae3891d2..f5600858fb 100644 --- a/cmd/cli/plugin/login/main.go +++ b/cmd/cli/plugin/login/main.go @@ -528,6 +528,8 @@ func getDiscoveryHTTPClient() *http.Client { func vSphereSupervisorLogin(endpoint string) (mergeFilePath, currentContext string, err error) { port := 443 + // TODO(BEN): this func is trickier, it has more dependencies on things that we likely don't + // want to pull into /pinniped-components/common. kubeConfig, kubecontext, err := tkgauth.KubeconfigWithPinnipedAuthLoginPlugin(endpoint, nil, tkgauth.DiscoveryStrategy{DiscoveryPort: &port, ClusterInfoConfigMap: wcpauth.SupervisorVIPConfigMapName}) if err != nil { log.Fatalf("Error creating kubeconfig with tanzu pinniped-auth login plugin: %v", err) diff --git a/cmd/cli/plugin/managementcluster/kubeconfig_get.go b/cmd/cli/plugin/managementcluster/kubeconfig_get.go index b4dcdbcc40..b608fe4b3e 100644 --- a/cmd/cli/plugin/managementcluster/kubeconfig_get.go +++ b/cmd/cli/plugin/managementcluster/kubeconfig_get.go @@ -103,8 +103,12 @@ func getPinnipedKubeconfig(tkgctlClient tkgctl.TKGClient, mcClustername string) // for management cluster the audience would be set to IssuerURL audience := clusterPinnipedInfo.PinnipedInfo.Issuer - kubeconfig, _ := pinnipedkubeconfig.GetPinnipedKubeconfig(clusterPinnipedInfo.ClusterInfo, clusterPinnipedInfo.PinnipedInfo, - clusterPinnipedInfo.ClusterName, audience) + kubeconfig, _ := pinnipedkubeconfig.GetPinnipedKubeconfig( + clusterPinnipedInfo.ClusterInfo, + clusterPinnipedInfo.PinnipedInfo, + clusterPinnipedInfo.ClusterName, + audience, + ) kubeconfigbytes, err := json.Marshal(kubeconfig) if err != nil {