Skip to content

Commit c87f382

Browse files
author
gentele
committed
fix codeclimate issues
1 parent 60523db commit c87f382

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import (
55

66
"github.com/covexo/devspace/cmd"
77
"github.com/covexo/devspace/pkg/devspace/upgrade"
8+
9+
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
810
)
911

1012
var version string

pkg/devspace/clients/kubectl/client.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
k8sv1 "k8s.io/api/core/v1"
1818
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1919
"k8s.io/client-go/kubernetes"
20-
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
2120
"k8s.io/client-go/rest"
2221
"k8s.io/client-go/tools/clientcmd"
2322
"k8s.io/client-go/tools/portforward"
@@ -215,17 +214,16 @@ func GetClientConfig() (*rest.Config, error) {
215214

216215
if (config.Cluster.UseKubeConfig != nil && *config.Cluster.UseKubeConfig) || config.Cluster.APIServer == nil {
217216
return clientcmd.BuildConfigFromFlags("", filepath.Join(fsutil.GetHomeDir(), ".kube", "config"))
218-
} else {
219-
return &rest.Config{
220-
Host: *config.Cluster.APIServer,
221-
Username: *config.Cluster.User.Username,
222-
TLSClientConfig: rest.TLSClientConfig{
223-
CAData: []byte(*config.Cluster.CaCert),
224-
CertData: []byte(*config.Cluster.User.ClientCert),
225-
KeyData: []byte(*config.Cluster.User.ClientKey),
226-
},
227-
}, nil
228217
}
218+
return &rest.Config{
219+
Host: *config.Cluster.APIServer,
220+
Username: *config.Cluster.User.Username,
221+
TLSClientConfig: rest.TLSClientConfig{
222+
CAData: []byte(*config.Cluster.CaCert),
223+
CertData: []byte(*config.Cluster.User.ClientCert),
224+
KeyData: []byte(*config.Cluster.User.ClientKey),
225+
},
226+
}, nil
229227
}
230228

231229
// ForwardPorts forwards the specified ports from the cluster to the local machine

0 commit comments

Comments
 (0)