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
2fb8b607
Commit
2fb8b607
authored
Jun 30, 2016
by
Adam Reese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cmd): load client inside subcommand
parent
1ba822c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
get.go
cmd/helm/get.go
+2
-2
get_manifest.go
cmd/helm/get_manifest.go
+4
-1
get_values.go
cmd/helm/get_values.go
+3
-0
No files found.
cmd/helm/get.go
View file @
2fb8b607
...
@@ -71,8 +71,8 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
...
@@ -71,8 +71,8 @@ func newGetCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
get
.
run
()
return
get
.
run
()
},
},
}
}
cmd
.
AddCommand
(
newGetValuesCmd
(
client
,
out
))
cmd
.
AddCommand
(
newGetValuesCmd
(
nil
,
out
))
cmd
.
AddCommand
(
newGetManifestCmd
(
client
,
out
))
cmd
.
AddCommand
(
newGetManifestCmd
(
nil
,
out
))
return
cmd
return
cmd
}
}
...
...
cmd/helm/get_manifest.go
View file @
2fb8b607
...
@@ -53,6 +53,9 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
...
@@ -53,6 +53,9 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
errReleaseRequired
return
errReleaseRequired
}
}
get
.
release
=
args
[
0
]
get
.
release
=
args
[
0
]
if
get
.
client
==
nil
{
get
.
client
=
helm
.
NewClient
(
helm
.
HelmHost
(
helm
.
Config
.
ServAddr
))
}
return
get
.
run
()
return
get
.
run
()
},
},
}
}
...
@@ -61,7 +64,7 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
...
@@ -61,7 +64,7 @@ func newGetManifestCmd(client helm.Interface, out io.Writer) *cobra.Command {
// getManifest implements 'helm get manifest'
// getManifest implements 'helm get manifest'
func
(
g
*
getManifestCmd
)
run
()
error
{
func
(
g
*
getManifestCmd
)
run
()
error
{
res
,
err
:=
helm
.
Get
ReleaseContent
(
g
.
release
)
res
,
err
:=
g
.
client
.
ReleaseContent
(
g
.
release
)
if
err
!=
nil
{
if
err
!=
nil
{
return
prettyError
(
err
)
return
prettyError
(
err
)
}
}
...
...
cmd/helm/get_values.go
View file @
2fb8b607
...
@@ -51,6 +51,9 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command {
...
@@ -51,6 +51,9 @@ func newGetValuesCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
errReleaseRequired
return
errReleaseRequired
}
}
get
.
release
=
args
[
0
]
get
.
release
=
args
[
0
]
if
get
.
client
==
nil
{
get
.
client
=
helm
.
NewClient
(
helm
.
HelmHost
(
helm
.
Config
.
ServAddr
))
}
return
get
.
run
()
return
get
.
run
()
},
},
}
}
...
...
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