Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkg/cmd/proxy/kubectl/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,8 @@ func NewCmd(clusteradmFlags *genericclioptionsclusteradm.ClusteradmFlags, stream
klog.V(4).Infof("kubeconfig file path is %s", tmpKubeconfigFilePath)

// Using kubectl to access the managed cluster using the above customized kubeconfig
result, err := runKubectlCommmand(tmpKubeconfigFilePath, o.kubectlArgs)
if err != nil {
return errors.Wrap(err, "run kubectl commands failed")
}
// We are using combinedoutput, so err msg should include in result, no need to handle err
result, _ := runKubectlCommmand(tmpKubeconfigFilePath, o.kubectlArgs)
if _, err = streams.Out.Write(result); err != nil {
return errors.Wrap(err, "streams out write failed")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/proxy/kubectl/http-proxy-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s *httpProxyServer) handle(wr http.ResponseWriter, req *http.Request) {
if proxyConn != nil {
err = proxyConn.Close()
if err != nil {
klog.Errorf("connection closed: %v", err)
klog.V(4).ErrorS(err, "connection closed")
}
}
}()
Expand Down