-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download icons locally when running make charts #124
Conversation
3af1f55
to
abbc0e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two concerns here
- This kind of logic will make the Chart.yaml inside chart tar differ from index.yaml. This voilates one of the checkpoints we have when we release a chart.
- We are modifying metadata of something that is already in released and in use for old versions.
Alternate Solution
- Can we consider a make target which blocks a user in adding a version of a chart that has chart.icon not pointing to file://.assets/logos/{image}.png
abbc0e0
to
621d900
Compare
pkg/icons/icons.go
Outdated
for name := range helmIndexFile.Entries { | ||
latestEntryVersion := helmIndexFile.Entries[name][0] | ||
latestIconName := name | ||
if strings.Contains(name, "-crd") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// We don't add any icons for "CRD" because they are not displayed as installable charts
pkg/icons/icons.go
Outdated
return nil | ||
} | ||
|
||
func download(rootFs billy.Filesystem, url, path string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not needed for rancher/charts
But for rancher/partner-charts
if possible and if we are the ones who will implement this same strategy.
I would consider a for loop with go functions for the download execution.
120+ rancher partner charts
270b6ee
to
de302cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to run make validate
against dev-v2.9
and it broke
d6192b5
to
a19a0b0
Compare
a19a0b0
to
342dd95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
When running the
make charts
command, it will check if the icon is pointing to a HTTP URL, and if so, download it and change theChart.yaml
to generated from the packages folder to point to it