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
de678a25
Commit
de678a25
authored
Feb 24, 2017
by
Matt Butcher
Committed by
GitHub
Feb 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2002 from qiujian16/1992
Add --url option to helm serve
parents
ec18cbbf
95cdc705
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
serve.go
cmd/helm/serve.go
+9
-2
No files found.
cmd/helm/serve.go
View file @
de678a25
...
...
@@ -33,11 +33,12 @@ This command starts a local chart repository server that serves charts from a lo
The new server will provide HTTP access to a repository. By default, it will
scan all of the charts in '$HELM_HOME/repository/local' and serve those over
the
a
local IPv4 TCP port (default '127.0.0.1:8879').
the local IPv4 TCP port (default '127.0.0.1:8879').
`
type
serveCmd
struct
{
out
io
.
Writer
url
string
address
string
repoPath
string
}
...
...
@@ -56,6 +57,7 @@ func newServeCmd(out io.Writer) *cobra.Command {
f
:=
cmd
.
Flags
()
f
.
StringVar
(
&
srv
.
repoPath
,
"repo-path"
,
helmpath
.
Home
(
homePath
())
.
LocalRepository
(),
"local directory path from which to serve charts"
)
f
.
StringVar
(
&
srv
.
address
,
"address"
,
"127.0.0.1:8879"
,
"address to listen on"
)
f
.
StringVar
(
&
srv
.
url
,
"url"
,
""
,
"external URL of chart repository"
)
return
cmd
}
...
...
@@ -70,7 +72,12 @@ func (s *serveCmd) run() error {
}
fmt
.
Fprintln
(
s
.
out
,
"Regenerating index. This may take a moment."
)
if
err
:=
index
(
repoPath
,
"http://"
+
s
.
address
,
""
);
err
!=
nil
{
if
len
(
s
.
url
)
>
0
{
err
=
index
(
repoPath
,
s
.
url
,
""
)
}
else
{
err
=
index
(
repoPath
,
"http://"
+
s
.
address
,
""
)
}
if
err
!=
nil
{
return
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