Commit cccd896d authored by Dax McDonald's avatar Dax McDonald Committed by Craig Jellick
Browse files

[2.2] Return the icon url to the template to display in the UI (#21944)

* Refuse to serve icons from urls

Rancher now gives the link to the user directly for the user to load.
There is no need for Rancher to host externally available images.

* Remove helm fetch icon logic

* Return the icon url to the template to display in the UI

Problem: The icon url was not returned to the template so the template
would not display icons for charts with remote icons.

Solution: Do not fetch the icon but still return the url of the icon
to the template.
parent 81babaff
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -530,6 +530,9 @@ func (h *Helm) fetchIcon(iconURL, versionDir string) ([]byte, string, string, er
if strings.HasPrefix(iconURL, "file:") {
return h.iconFromFile(iconURL, versionDir)
}
if strings.HasPrefix(iconURL, "http:") || strings.HasPrefix(iconURL, "https:") {
return nil, "", iconURL, nil
}
return nil, "", "", errors.Errorf("unknown file type [%s]", iconURL)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment