Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
6b222cdc
Commit
6b222cdc
authored
Nov 01, 2016
by
Matt Butcher
Committed by
GitHub
Nov 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1490 from technosophos/fix/1488-shorter-errors
fix(1488): suppress gRPC logs and errors
parents
13ec13af
32354be0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
helm.go
cmd/helm/helm.go
+6
-0
version.go
cmd/helm/version.go
+5
-1
No files found.
cmd/helm/helm.go
View file @
6b222cdc
...
@@ -20,11 +20,14 @@ import (
...
@@ -20,11 +20,14 @@ import (
"errors"
"errors"
"fmt"
"fmt"
"io"
"io"
"io/ioutil"
"log"
"os"
"os"
"strings"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/grpclog"
"k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/restclient"
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/client/unversioned"
...
@@ -90,6 +93,9 @@ func newRootCmd(out io.Writer) *cobra.Command {
...
@@ -90,6 +93,9 @@ func newRootCmd(out io.Writer) *cobra.Command {
p
.
StringVar
(
&
kubeContext
,
"kube-context"
,
""
,
"name of the kubeconfig context to use"
)
p
.
StringVar
(
&
kubeContext
,
"kube-context"
,
""
,
"name of the kubeconfig context to use"
)
p
.
BoolVarP
(
&
flagDebug
,
"debug"
,
""
,
false
,
"enable verbose output"
)
p
.
BoolVarP
(
&
flagDebug
,
"debug"
,
""
,
false
,
"enable verbose output"
)
// Tell gRPC not to log to console.
grpclog
.
SetLogger
(
log
.
New
(
ioutil
.
Discard
,
""
,
log
.
LstdFlags
))
rup
:=
newRepoUpdateCmd
(
out
)
rup
:=
newRepoUpdateCmd
(
out
)
rup
.
Deprecated
=
"use 'helm repo update'
\n
"
rup
.
Deprecated
=
"use 'helm repo update'
\n
"
...
...
cmd/helm/version.go
View file @
6b222cdc
...
@@ -20,6 +20,7 @@ import (
...
@@ -20,6 +20,7 @@ import (
"errors"
"errors"
"fmt"
"fmt"
"io"
"io"
"os"
"github.com/spf13/cobra"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"google.golang.org/grpc"
...
@@ -101,7 +102,10 @@ func (v *versionCmd) run() error {
...
@@ -101,7 +102,10 @@ func (v *versionCmd) run() error {
if
grpc
.
Code
(
err
)
==
codes
.
Unimplemented
{
if
grpc
.
Code
(
err
)
==
codes
.
Unimplemented
{
return
errors
.
New
(
"server is too old to know its version"
)
return
errors
.
New
(
"server is too old to know its version"
)
}
}
return
err
if
flagDebug
{
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
}
return
errors
.
New
(
"cannot connect to Tiller"
)
}
}
fmt
.
Fprintf
(
v
.
out
,
"Server: %#v
\n
"
,
resp
.
Version
)
fmt
.
Fprintf
(
v
.
out
,
"Server: %#v
\n
"
,
resp
.
Version
)
return
nil
return
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment