-
Notifications
You must be signed in to change notification settings - Fork 15
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
Define --registry flag behaviour #378
Comments
I think there are some misunderstandings what is generally used and what are rules we/suse added on ourselves. eg.
That example right there is not correct. Our images are NOT independent of our registry. Our registry, we, added this namespace to the images. When you do
to get local copy of the image, you will not have this path anywhere:
I argue that that namespace, that ugly string we/obs added, is part of our infrastructure and part of our registry name because it's not consistent across different registries. Do we know for certain that cloud registries will use the very same path like we do? |
@aaannz when I mentioned the image is independent from the registry I was mentioning the image delivered as RPM, where the image name on the metadata file doesn't contain the registry where the image is published. It only contained a concatenation of the image path. One main goal for me is being able to have good sane defaults and avoid the need for users to enter too many fields. That is why I was thinking if users keep the same path in the internal registry, then they could add just the registry, otherwise they would need to specify the images one by one, since we cannot know what they defined as name. Skopeo can also be used to sync a full tree, and can re-use the same path. Can you try Do you have any suggestions on how would be the best approach on this one? For the cloud I need to double check, but as far as I know they will keep the same structure as we have on registry.suse.com. Thank you |
I did not notice
If we assume that the name of the SUMA image will always be
|
The --skoped will also add the registry fqdn, not just the path, IIRC. I think I lost you :) Let me check if I understand you. 1th we need to check with public cloud if the image paths will be the same also in the cloud. The --registry will be the prefix to be used. In the cloud, users can just specify the fqdn for the registry. For internal registry if they use the exact same path, is the same (or if then add an extra prefix, like with the scoped flag of skopeo sync). By default, registry will be What if users specify the registry and for example |
Indeed it did. Without
Yes
Yes, assuming cloud uses that path as well
I think we should not surprise our users: |
Initially for cloud only images in RPM will be available. In that case the RPM is the same as from SCC, and we can trust the path will be the same. |
I didn't got this one, you have registry two time |
Yes, those are two examples. One where registry is just FQDN, another example to demonstrate that part of the registry can be also some path and not plain fqdn. For example to use with internal registry. |
Sorry to be picky here but: shouldn't That's what I'd expect as a user at least. Don't we have |
What we want is to be able to switch all images from one registry to another. Nowhere it is defined that registry must be only fqdn. Btw. with agreed approach if user uses |
We already start to see confusion where |
We may be missing better documentation on the tool, but the behaviour is clear, and the current implementation will cope with several scenarios: Cloud Registry, copy images and keep the SUSE/UYUNI published path, with or without a prefix. The issue we have seen was a miss configuration on sumaform that was not updated for server after the changes we made to the registry flag. |
For public cloud and internal registry usage, we must have a way to overwrite registry to where we want to pull the images from.
This card aims to agree on how to make it, and document what should be implemented.
For podman we always want to use the local RPM image if available. Local images are located at
/usr/share/suse-docker-images/native
.The metadata file will have the image name and available tags. The name in the RPM image is independent from the registry (example:
suse-manager-5.0-x86_64-server
), and is computed from the image namespace defined on SCC.example:
Image to use:
registry.suse.com/suse/manager/5.0/x86_64/server
Will look at the file system by image name
suse-manager-5.0-x86_64-server
Our goals are:
Proposed Solution
Each image used in the deployment will have its configuration as we have now. Example:
--image
,--coco-image
,--hubxmlrpc-image
.Those properties will be setting the image path/namespace, and can also set the tag name.
The registry flag will set the prefix. It can be just the registry FQDN, or also include some path prefix. Example:
--registry=myreg.com
--registry=myreg.com/prefix/path/
We always give priority to local images, but searching with the image path defined on image specific path flags. The values on those flags will be different on SUMA or Uyuni. The registry flag will affect only the online image pull.
If the user defines only the registry all images are affected with the same prefix.
If they want to change the default namespace, users should define it for each image one by one, with the correct location. Reason: if they start to play around with names, we cannot know how imaginative they can get, so define them individually.
Scenarios:
Examples
Default for
--registry
: registry.suse.comDefault image path
--image
: suse/manager/5.0/x86_64/serverDefault image tag
--tag
: 5-0No flags defined
-- local look-up with
- ImageName: suse/manager/5.0/x86_64/server
- Tag: 5.0.0
Set the Registry
registry=cloud.com
Look up locally with the default image path. Remote will use the defined registry + the image path
-- local look-up with
- ImageName: suse/manager/5.0/x86_64/server
- Tag: 5.0.0
Flags set for tag and registry
registry=cloud.com
Tag: 5.0.0-tag
Look up locally with the default image path. Remote will use the defined registry + the image path
-- local look-up with
- Image: suse/manager/5.0/x86_64/server
- Tag: 5.0.0-tag
in this case tag will not be found, and we will move to a remote download
Flags set for image, tag and registry
registry=cloud.com
Image: my/path/server
Tag: 5.0.0-tag
Look-up locally with the passed image path and tag. Fall back to remote using the image passed, using the passed registry
-- local look-up with
- Image: my/path/server
- Tag: 5.0.0-tag
In this case, it will never find the image name, since it's not our image path. Will use remote download.
#Related links:
The text was updated successfully, but these errors were encountered: