-
Notifications
You must be signed in to change notification settings - Fork 221
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
[WIP] Add support for Red Hat UBI #658
Conversation
This is now reused in utils.ImageReferenceGetBasename() and is needed for future work on toolbox images "tracking".
UBI is here :). TODO
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
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.
Thank you for working on this!
Let's see if we can split the commits a bit more. eg., one where ResolveContainerAndImageNames
gets replaced by the new image backend, followed by one where --distro
gets added and so on.
Some quick comments:
"fedora-toolbox": { | ||
"registry.fedoraproject.org", | ||
"fedora-toolbox", | ||
"latest", |
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.
The latest
part makes me a bit nervous. :)
I did toolbox create
on my F33 host, and got a F34 container named fedora-toolbox-latest
. Another point of confusion would be when the host gets upgraded, or the value of latest
changes over time.
} | ||
|
||
// Image holds parts of a full URI of an image | ||
type Image struct { |
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 am wondering if we should call it Distro
, instead of Image
. Then we could include a function pointer to parse the release string in a distro-specific way.
I split up the commits, and fixed up some of the above issues in #667 Most importantly, I had to skip some parts of the new container and image tracking backend to side-step some issues that I couldn't figure out on my own. eg., the one caused by the use of |
We've made progress in this front in #1019. See the top comment for links to community supported images. |
Adding support for [Red Hat UBI] (Universal Base Image) is a requirement for Toolbox to be included in RHEL (and in the process replacing https://github.com/coreos/toolbox).
Adding support for a new image requires implementing an internal "store" of supported images. To be frank, this is something I dreaded quite a bit for some time already :). This implements a very basic image store that allows matching based on a os-release:ID (e.g.,
fedora
is Fedora,rhel
is RHEL - in case of Toolbox UBI,..). This matching is available through a new option--distro | -d
. The existing--release | -r
option complements the new option.The updated workflow should look a bit like this:
On distributions without a matching supported image will Fedora stay as the default.
While this adds only support for UBI, technically speaking, it should be possible to add support for even other images. Another matter is who is going to maintain the images and where they will be stored. Before these questions are answered, we'll continue offering only Fedora and UBI images (but you are always free to use an image of your own making!).