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
5c53f868
Commit
5c53f868
authored
Jun 29, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cmd): remove --file flag for helm get
Users can redirect stdout to a file
parent
62eb4f3a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
25 deletions
+5
-25
get.go
cmd/helm/get.go
+5
-25
No files found.
cmd/helm/get.go
View file @
5c53f868
...
@@ -19,7 +19,6 @@ package main
...
@@ -19,7 +19,6 @@ package main
import
(
import
(
"errors"
"errors"
"fmt"
"fmt"
"os"
"time"
"time"
"github.com/spf13/cobra"
"github.com/spf13/cobra"
...
@@ -56,11 +55,6 @@ were generated from this release's chart(s). If a chart is dependent on other
...
@@ -56,11 +55,6 @@ were generated from this release's chart(s). If a chart is dependent on other
charts, those resources will also be included in the manifest.
charts, those resources will also be included in the manifest.
`
`
// getOut is the filename to direct output.
//
// If it is blank, output is sent to os.Stdout.
var
getOut
=
""
var
allValues
=
false
var
allValues
=
false
var
errReleaseRequired
=
errors
.
New
(
"release name is required"
)
var
errReleaseRequired
=
errors
.
New
(
"release name is required"
)
...
@@ -88,9 +82,6 @@ var getManifestCommand = &cobra.Command{
...
@@ -88,9 +82,6 @@ var getManifestCommand = &cobra.Command{
}
}
func
init
()
{
func
init
()
{
// 'get' command flags.
getCommand
.
PersistentFlags
()
.
StringVarP
(
&
getOut
,
"file"
,
"f"
,
""
,
"output file"
)
// 'get values' flags.
// 'get values' flags.
getValuesCommand
.
PersistentFlags
()
.
BoolVarP
(
&
allValues
,
"all"
,
"a"
,
false
,
"dump all (computed) values"
)
getValuesCommand
.
PersistentFlags
()
.
BoolVarP
(
&
allValues
,
"all"
,
"a"
,
false
,
"dump all (computed) values"
)
...
@@ -151,10 +142,12 @@ func getValues(cmd *cobra.Command, args []string) error {
...
@@ -151,10 +142,12 @@ func getValues(cmd *cobra.Command, args []string) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
return
getToFile
(
cfgStr
)
fmt
.
Println
(
cfgStr
)
return
nil
}
}
return
getToFile
(
res
.
Release
.
Config
.
Raw
)
fmt
.
Println
(
res
.
Release
.
Config
.
Raw
)
return
nil
}
}
// getManifest implements 'helm get manifest'
// getManifest implements 'helm get manifest'
...
@@ -167,19 +160,6 @@ func getManifest(cmd *cobra.Command, args []string) error {
...
@@ -167,19 +160,6 @@ func getManifest(cmd *cobra.Command, args []string) error {
if
err
!=
nil
{
if
err
!=
nil
{
return
prettyError
(
err
)
return
prettyError
(
err
)
}
}
return
getToFile
(
res
.
Release
.
Manifest
)
fmt
.
Println
(
res
.
Release
.
Manifest
)
}
func
getToFile
(
v
interface
{})
error
{
out
:=
os
.
Stdout
if
len
(
getOut
)
>
0
{
t
,
err
:=
os
.
Create
(
getOut
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to create %s: %s"
,
getOut
,
err
)
}
defer
t
.
Close
()
out
=
t
}
fmt
.
Fprintln
(
out
,
v
)
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