@@ -486,30 +486,30 @@ func createHelmActionConfig(c *Client, cfg ApplyHelmChartConfig) (*action.Config
486486 authInfo = "meshkit-helm-user"
487487 )
488488
489- // eksKubeConfig is just placeholder, will change these changes are reviewed
490- eksKubeConfig := clientcmdapi .NewConfig ()
489+ helmKubeConfig := clientcmdapi .NewConfig ()
491490
492- eksKubeConfig .Clusters [clusterName ] = & clientcmdapi.Cluster {
491+ helmKubeConfig .Clusters [clusterName ] = & clientcmdapi.Cluster {
493492 Server : c .RestConfig .Host ,
494493 TLSServerName : c .RestConfig .ServerName ,
495494 InsecureSkipTLSVerify : c .RestConfig .Insecure ,
496495 CertificateAuthority : c .RestConfig .CAFile ,
497496 CertificateAuthorityData : c .RestConfig .CAData ,
498497 }
499498
500- eksKubeConfig .AuthInfos [clusterName ] = & clientcmdapi.AuthInfo {
499+ helmKubeConfig .AuthInfos [clusterName ] = & clientcmdapi.AuthInfo {
501500 Exec : c .RestConfig .ExecProvider ,
502501 AuthProvider : c .RestConfig .AuthProvider ,
503502 }
504503
505- eksKubeConfig .Contexts [clusterName ] = & clientcmdapi.Context {
504+ helmKubeConfig .Contexts [clusterName ] = & clientcmdapi.Context {
506505 Cluster : clusterName ,
507506 AuthInfo : authInfo ,
508507 }
509508
510- eksKubeConfig .CurrentContext = clusterName
509+ // explicitly setting kube context may not be required
510+ helmKubeConfig .CurrentContext = clusterName
511511
512- configBytes , err := clientcmd .Write (* eksKubeConfig )
512+ configBytes , err := clientcmd .Write (* helmKubeConfig )
513513 if err != nil {
514514 return nil , nil , fmt .Errorf ("failed to write kubeconfig %v" , err )
515515 }
0 commit comments