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
9cfbbb34
Commit
9cfbbb34
authored
Sep 29, 2016
by
fibonacci1729
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(1245): hook up revision flag to helm get {manifest,values,hooks}
parent
715be826
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
get.go
cmd/helm/get.go
+1
-1
get_hooks.go
cmd/helm/get_hooks.go
+3
-1
get_manifest.go
cmd/helm/get_manifest.go
+4
-1
get_values.go
cmd/helm/get_values.go
+4
-1
No files found.
cmd/helm/get.go
View file @
9cfbbb34
...
...
@@ -73,7 +73,7 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
},
}
cmd
.
Persistent
Flags
()
.
Int32Var
(
&
get
.
version
,
"revision"
,
0
,
"get the named release with revision"
)
cmd
.
Flags
()
.
Int32Var
(
&
get
.
version
,
"revision"
,
0
,
"get the named release with revision"
)
cmd
.
AddCommand
(
newGetValuesCmd
(
nil
,
out
))
cmd
.
AddCommand
(
newGetManifestCmd
(
nil
,
out
))
...
...
cmd/helm/get_hooks.go
View file @
9cfbbb34
...
...
@@ -35,6 +35,7 @@ type getHooksCmd struct {
release
string
out
io
.
Writer
client
helm
.
Interface
version
int32
}
func
newGetHooksCmd
(
client
helm
.
Interface
,
out
io
.
Writer
)
*
cobra
.
Command
{
...
...
@@ -55,11 +56,12 @@ func newGetHooksCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
ghc
.
run
()
},
}
cmd
.
Flags
()
.
Int32Var
(
&
ghc
.
version
,
"revision"
,
0
,
"get the named release with revision"
)
return
cmd
}
func
(
g
*
getHooksCmd
)
run
()
error
{
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
)
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
,
helm
.
ContentReleaseVersion
(
g
.
version
)
)
if
err
!=
nil
{
fmt
.
Fprintln
(
g
.
out
,
g
.
release
)
return
prettyError
(
err
)
...
...
cmd/helm/get_manifest.go
View file @
9cfbbb34
...
...
@@ -37,6 +37,7 @@ type getManifestCmd struct {
release
string
out
io
.
Writer
client
helm
.
Interface
version
int32
}
func
newGetManifestCmd
(
client
helm
.
Interface
,
out
io
.
Writer
)
*
cobra
.
Command
{
...
...
@@ -59,12 +60,14 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
get
.
run
()
},
}
cmd
.
Flags
()
.
Int32Var
(
&
get
.
version
,
"revision"
,
0
,
"get the named release with revision"
)
return
cmd
}
// getManifest implements 'helm get manifest'
func
(
g
*
getManifestCmd
)
run
()
error
{
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
)
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
,
helm
.
ContentReleaseVersion
(
g
.
version
)
)
if
err
!=
nil
{
return
prettyError
(
err
)
}
...
...
cmd/helm/get_values.go
View file @
9cfbbb34
...
...
@@ -35,6 +35,7 @@ type getValuesCmd struct {
allValues
bool
out
io
.
Writer
client
helm
.
Interface
version
int32
}
func
newGetValuesCmd
(
client
helm
.
Interface
,
out
io
.
Writer
)
*
cobra
.
Command
{
...
...
@@ -55,13 +56,15 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
get
.
run
()
},
}
cmd
.
Flags
()
.
Int32Var
(
&
get
.
version
,
"revision"
,
0
,
"get the named release with revision"
)
cmd
.
Flags
()
.
BoolVarP
(
&
get
.
allValues
,
"all"
,
"a"
,
false
,
"dump all (computed) values"
)
return
cmd
}
// getValues implements 'helm get values'
func
(
g
*
getValuesCmd
)
run
()
error
{
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
)
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
,
helm
.
ContentReleaseVersion
(
g
.
version
)
)
if
err
!=
nil
{
return
prettyError
(
err
)
}
...
...
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