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
e6a8045b
Commit
e6a8045b
authored
May 27, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #770 from adamreese/feat/logging
fix(cmd): rename verbose flag to debug
parents
106b8938
b26bd2e9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
+12
-10
helm.go
cmd/helm/helm.go
+7
-5
init.go
cmd/helm/init.go
+1
-1
install.go
cmd/helm/install.go
+2
-2
package.go
cmd/helm/package.go
+2
-2
No files found.
cmd/helm/helm.go
View file @
e6a8045b
...
...
@@ -2,6 +2,7 @@ package main
import
(
"errors"
"flag"
"fmt"
"os"
"strings"
...
...
@@ -19,8 +20,8 @@ const (
var
helmHome
string
var
tillerHost
string
// flag
Verbose
is a signal that the user wants additional output.
var
flag
Verbose
bool
// flag
Debug
is a signal that the user wants additional output.
var
flag
Debug
bool
var
globalUsage
=
`The Kubernetes package manager
...
...
@@ -60,7 +61,8 @@ func init() {
p
:=
RootCommand
.
PersistentFlags
()
p
.
StringVar
(
&
helmHome
,
"home"
,
home
,
"location of your Helm config. Overrides $HELM_HOME."
)
p
.
StringVar
(
&
tillerHost
,
"host"
,
thost
,
"address of tiller. Overrides $HELM_HOST."
)
p
.
BoolVarP
(
&
flagVerbose
,
"verbose"
,
"v"
,
false
,
"enable verbose output"
)
p
.
BoolVarP
(
&
flagDebug
,
"debug"
,
""
,
false
,
"enable verbose output"
)
p
.
AddGoFlagSet
(
flag
.
CommandLine
)
}
func
main
()
{
...
...
@@ -78,14 +80,14 @@ func setupConnection(c *cobra.Command, args []string) error {
}
tillerHost
=
fmt
.
Sprintf
(
":%d"
,
tunnel
.
Local
)
if
flag
Verbose
{
if
flag
Debug
{
fmt
.
Printf
(
"Created tunnel using local port: '%d'
\n
"
,
tunnel
.
Local
)
}
}
// Set up the gRPC config.
helm
.
Config
.
ServAddr
=
tillerHost
if
flag
Verbose
{
if
flag
Debug
{
fmt
.
Printf
(
"Server: %q
\n
"
,
helm
.
Config
.
ServAddr
)
}
return
nil
...
...
cmd/helm/init.go
View file @
e6a8045b
...
...
@@ -65,7 +65,7 @@ func installTiller() error {
i
:=
client
.
NewInstaller
()
i
.
Tiller
[
"Image"
]
=
tillerImg
i
.
Tiller
[
"Namespace"
]
=
tillerNamespace
err
:=
i
.
Install
(
flag
Verbose
,
!
initSkipNamespace
)
err
:=
i
.
Install
(
flag
Debug
,
!
initSkipNamespace
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"error installing: %s"
,
err
)
...
...
cmd/helm/install.go
View file @
e6a8045b
...
...
@@ -57,7 +57,7 @@ func runInstall(cmd *cobra.Command, args []string) error {
if
err
!=
nil
{
return
err
}
if
flag
Verbose
{
if
flag
Debug
{
fmt
.
Printf
(
"Chart path: %s
\n
"
,
chartpath
)
}
...
...
@@ -87,7 +87,7 @@ func printRelease(rel *release.Release) {
if
rel
==
nil
{
return
}
if
flag
Verbose
{
if
flag
Debug
{
fmt
.
Printf
(
"NAME: %s
\n
"
,
rel
.
Name
)
fmt
.
Printf
(
"INFO: %s %s
\n
"
,
timeconv
.
String
(
rel
.
Info
.
LastDeployed
),
rel
.
Info
.
Status
)
fmt
.
Printf
(
"CHART: %s %s
\n
"
,
rel
.
Chart
.
Metadata
.
Name
,
rel
.
Chart
.
Metadata
.
Version
)
...
...
cmd/helm/package.go
View file @
e6a8045b
...
...
@@ -60,7 +60,7 @@ func runPackage(cmd *cobra.Command, args []string) error {
return
err
}
name
,
err
:=
chart
.
Save
(
ch
,
cwd
)
if
err
==
nil
&&
flag
Verbose
{
if
err
==
nil
&&
flag
Debug
{
cmd
.
Printf
(
"Saved %s to current directory
\n
"
,
name
)
}
...
...
@@ -69,7 +69,7 @@ func runPackage(cmd *cobra.Command, args []string) error {
if
save
{
if
err
:=
repo
.
AddChartToLocalRepo
(
ch
,
localRepoDirectory
());
err
!=
nil
{
return
err
}
else
if
flag
Verbose
{
}
else
if
flag
Debug
{
cmd
.
Printf
(
"Saved %s to %s
\n
"
,
name
,
localRepoDirectory
())
}
}
...
...
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