pull/31792/merge
Aleksei Krugliak 1 day ago committed by GitHub
commit 5d2bd0e4d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -81,6 +81,8 @@ type Metadata struct {
Dependencies []*Dependency `json:"dependencies,omitempty"`
// Specifies the chart type: application or library
Type string `json:"type,omitempty"`
// Specifies the chart URL that was used to initially install a chart.
RepoURL string `json:"repoURL,omitempty"`
}
// Validate checks the metadata for known issues and sanitizes string
@ -98,6 +100,7 @@ func (md *Metadata) Validate() error {
md.Tags = sanitizeString(md.Tags)
md.AppVersion = sanitizeString(md.AppVersion)
md.KubeVersion = sanitizeString(md.KubeVersion)
md.RepoURL = sanitizeString(md.RepoURL)
for i := range md.Sources {
md.Sources[i] = sanitizeString(md.Sources[i])
}

@ -979,6 +979,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
if err != nil {
return "", err
}
c.RepoURL = dl.RepositoryURL
lname, err := filepath.Abs(filename)
if err != nil {

@ -263,6 +263,12 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options
return nil, err
}
if client.ChartPathOptions.RepoURL != "" {
chartRequested.Metadata.RepoURL = client.ChartPathOptions.RepoURL
} else {
chartRequested.Metadata.RepoURL = "path"
}
ac, err := chart.NewAccessor(chartRequested)
if err != nil {
return nil, err

@ -198,6 +198,11 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
if err != nil {
return err
}
if client.ChartPathOptions.RepoURL != "" {
ch.Metadata.RepoURL = client.ChartPathOptions.RepoURL
} else {
ch.Metadata.RepoURL = "path"
}
ac, err := ci.NewAccessor(ch)
if err != nil {

@ -84,7 +84,8 @@ type ChartDownloader struct {
ContentCache string
// Cache specifies the cache implementation to use.
Cache Cache
Cache Cache
RepositoryURL string
}
// DownloadTo retrieves a chart. Depending on the settings, it may also download a provenance file.
@ -445,6 +446,9 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (string, *url
}
if r != nil && r.Config != nil {
if r.Config.URL != "" {
c.RepositoryURL = r.Config.URL
}
if r.Config.CertFile != "" || r.Config.KeyFile != "" || r.Config.CAFile != "" {
c.Options = append(c.Options, getter.WithTLSClientConfig(r.Config.CertFile, r.Config.KeyFile, r.Config.CAFile))
}

Loading…
Cancel
Save