-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add RHCOSBaseURI to templating for bootstrap files #2035
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| package rhcos | ||
|
|
||
| import ( | ||
| "context" | ||
| "net/url" | ||
|
|
||
| "github.com/pkg/errors" | ||
| ) | ||
|
|
||
| // BaseURI fetches the BaseURI where images can be downloaded from | ||
| func BaseURI() (string, error) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This information is rather kept private to the package... Please use or add other image functions that provide th boot-image directly.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently the downloader container we're using requires the base URI We can rework that, or pass the full URL to the openstack image perhaps. cc @derekhiggins
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sounds fine to me, let me know if you want to update the parameters the downloader container expects, |
||
| meta, err := fetchRHCOSBuild(context.TODO()) | ||
| if err != nil { | ||
| return "", errors.Wrap(err, "failed to fetch RHCOS metadata") | ||
| } | ||
|
|
||
| base, err := url.Parse(meta.BaseURI) | ||
| if err != nil { | ||
| return "", err | ||
| } | ||
|
|
||
| return base.String(), nil | ||
| } | ||
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'm sorry but this new env variable cannot be added. These env variables bypass installer input models and we would like to keep them to moving towards zero number.
Can you provide how you expect this variable to be used?
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.
Ok I can remove it, I was following the existing conventions, and I was thinking it would be a better alternative to the "hidden" CACHEURL in openshift-metal3/kni-installer@c3e0e8e
The reason this is needed/useful is that for both repeated local testing and CI downloading the large RHCOS image is slow and a waste of bandwidth - also it may be required to avoid hitting installer hard-coded timeouts when using a slow connection that cannot download the images fast enough.
If we remove this variable, I'll need to add a new install-config variable for the baremetal platform that can provide the IP for the CACHEURL (since it's hard-coded in the commit referenced above), would that be a more acceptable approach?