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
afb2b934
Commit
afb2b934
authored
Aug 26, 2016
by
Matt Butcher
Committed by
GitHub
Aug 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1104 from technosophos/feat/1100-multi-args
feat(helm): allow multiple args for fetch, package, delete
parents
88fc5e8c
f3022a09
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
delete.go
cmd/helm/delete.go
+9
-3
fetch.go
cmd/helm/fetch.go
+8
-3
package.go
cmd/helm/package.go
+8
-3
No files found.
cmd/helm/delete.go
View file @
afb2b934
...
...
@@ -50,7 +50,7 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command {
}
cmd
:=
&
cobra
.
Command
{
Use
:
"delete [flags] RELEASE_NAME"
,
Use
:
"delete [flags] RELEASE_NAME
[...]
"
,
Aliases
:
[]
string
{
"del"
},
SuggestFor
:
[]
string
{
"remove"
,
"rm"
},
Short
:
"given a release name, delete the release from Kubernetes"
,
...
...
@@ -60,9 +60,15 @@ func newDeleteCmd(c helm.Interface, out io.Writer) *cobra.Command {
if
len
(
args
)
==
0
{
return
errors
.
New
(
"command 'delete' requires a release name"
)
}
del
.
name
=
args
[
0
]
del
.
client
=
ensureHelmClient
(
del
.
client
)
return
del
.
run
()
for
i
:=
0
;
i
<
len
(
args
);
i
++
{
del
.
name
=
args
[
i
]
if
err
:=
del
.
run
();
err
!=
nil
{
return
err
}
}
return
nil
},
}
f
:=
cmd
.
Flags
()
...
...
cmd/helm/fetch.go
View file @
afb2b934
...
...
@@ -64,15 +64,20 @@ func newFetchCmd(out io.Writer) *cobra.Command {
fch
:=
&
fetchCmd
{
out
:
out
}
cmd
:=
&
cobra
.
Command
{
Use
:
"fetch [
chart URL | repo/chartname
]"
,
Use
:
"fetch [
flags] [chart URL | repo/chartname] [...
]"
,
Short
:
"download a chart from a repository and (optionally) unpack it in local directory"
,
Long
:
fetchDesc
,
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
if
len
(
args
)
==
0
{
return
fmt
.
Errorf
(
"This command needs at least one argument, url or repo/name of the chart."
)
}
fch
.
chartRef
=
args
[
0
]
return
fch
.
run
()
for
i
:=
0
;
i
<
len
(
args
);
i
++
{
fch
.
chartRef
=
args
[
i
]
if
err
:=
fch
.
run
();
err
!=
nil
{
return
err
}
}
return
nil
},
}
...
...
cmd/helm/package.go
View file @
afb2b934
...
...
@@ -57,14 +57,13 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command {
out
:
out
,
}
cmd
:=
&
cobra
.
Command
{
Use
:
"package [
CHART_PATH
]"
,
Use
:
"package [
flags] [CHART_PATH] [...
]"
,
Short
:
"package a chart directory into a chart archive"
,
Long
:
packageDesc
,
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
if
len
(
args
)
==
0
{
return
fmt
.
Errorf
(
"This command needs at least one argument, the path to the chart."
)
}
pkg
.
path
=
args
[
0
]
if
pkg
.
sign
{
if
pkg
.
key
==
""
{
return
errors
.
New
(
"--key is required for signing a package"
)
...
...
@@ -73,7 +72,13 @@ func newPackageCmd(client helm.Interface, out io.Writer) *cobra.Command {
return
errors
.
New
(
"--keyring is required for signing a package"
)
}
}
return
pkg
.
run
(
cmd
,
args
)
for
i
:=
0
;
i
<
len
(
args
);
i
++
{
pkg
.
path
=
args
[
i
]
if
err
:=
pkg
.
run
(
cmd
,
args
);
err
!=
nil
{
return
err
}
}
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