|
|
@ -33,7 +33,7 @@ import (
|
|
|
|
"k8s.io/helm/pkg/repo"
|
|
|
|
"k8s.io/helm/pkg/repo"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const fetchDesc = `
|
|
|
|
const pullDesc = `
|
|
|
|
Retrieve a package from a package repository, and download it locally.
|
|
|
|
Retrieve a package from a package repository, and download it locally.
|
|
|
|
|
|
|
|
|
|
|
|
This is useful for fetching packages to inspect, modify, or repackage. It can
|
|
|
|
This is useful for fetching packages to inspect, modify, or repackage. It can
|
|
|
@ -48,7 +48,7 @@ file, and MUST pass the verification process. Failure in any part of this will
|
|
|
|
result in an error, and the chart will not be saved locally.
|
|
|
|
result in an error, and the chart will not be saved locally.
|
|
|
|
`
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
|
|
type fetchOptions struct {
|
|
|
|
type pullOptions struct {
|
|
|
|
destdir string // --destination
|
|
|
|
destdir string // --destination
|
|
|
|
devel bool // --devel
|
|
|
|
devel bool // --devel
|
|
|
|
untar bool // --untar
|
|
|
|
untar bool // --untar
|
|
|
@ -60,13 +60,14 @@ type fetchOptions struct {
|
|
|
|
chartPathOptions
|
|
|
|
chartPathOptions
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func newFetchCmd(out io.Writer) *cobra.Command {
|
|
|
|
func newPullCmd(out io.Writer) *cobra.Command {
|
|
|
|
o := &fetchOptions{}
|
|
|
|
o := &pullOptions{}
|
|
|
|
|
|
|
|
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "fetch [chart URL | repo/chartname] [...]",
|
|
|
|
Use: "pull [chart URL | repo/chartname] [...]",
|
|
|
|
Short: "download a chart from a repository and (optionally) unpack it in local directory",
|
|
|
|
Short: "download a chart from a repository and (optionally) unpack it in local directory",
|
|
|
|
Long: fetchDesc,
|
|
|
|
Aliases: []string{"fetch"},
|
|
|
|
|
|
|
|
Long: pullDesc,
|
|
|
|
Args: require.MinimumNArgs(1),
|
|
|
|
Args: require.MinimumNArgs(1),
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
if o.version == "" && o.devel {
|
|
|
|
if o.version == "" && o.devel {
|
|
|
@ -96,7 +97,7 @@ func newFetchCmd(out io.Writer) *cobra.Command {
|
|
|
|
return cmd
|
|
|
|
return cmd
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (o *fetchOptions) run(out io.Writer) error {
|
|
|
|
func (o *pullOptions) run(out io.Writer) error {
|
|
|
|
c := downloader.ChartDownloader{
|
|
|
|
c := downloader.ChartDownloader{
|
|
|
|
HelmHome: settings.Home,
|
|
|
|
HelmHome: settings.Home,
|
|
|
|
Out: out,
|
|
|
|
Out: out,
|