skopeo
skopeo copied to clipboard
WIP added implementation for scoped-without-registry support on sync
Adds support to sync 2 registries with all namespaces but without adding the registry as prefix
Fixes #1072 based on the comments of #854
Name of the commandline argument can be discussed
Help is appreciated especially for writing meaningful tests!
:heavy_check_mark: Code :x: Tests :x: Documentation
@c0ffee Needs a rebase. @mtrmac @vrothberg PTAL
Yeah, I think it’s been a mistake to hard-code any naming policy in sync as a default behavior, and adding more and more options of that kind won’t make the basic mistake go away.
AFAICS to this day you can’t copy $registry1/ns1/repo to $registry2/ns2/some-other-repo-name if I’m not mistaken.
- on the CLI, a fix for that would automatically give users an easy-to-understand way to build any other repo hierarchy as well, wouldn’t it?
- The YAML format is not trivially extensible to allow this (there is no way to put the “destination” in a
$registry.images-by-tagfor example… it still should happen, or maybe deprecate the YAML format and just let users write a shell script, I’m still not sure what makes the YAML format necessary.
we use this basically to synchronize some of our on-prem host registries to a merged remote one and some images use several namespaces which makes it uncomfortable
from my perspective the behavior of scope is not what you would expect and this is why all these issues exists, so the best way would be to fix this, but this is not possible right?
i actually like the yaml format, one nice way to use it is to check it in a repo and use it as a kind of promoting way which images should be available on the external mirror(controlled access on the repo and CI chain is using it as input)
before i put now more work into this? what would be the preferred way to continue?
For CLI, an option (sadly it has to be an option) to do no mapping and just let the user specify a destination repo, per the previous comment.
For YAML, I’m not immediately sure. It would be possible to keep the existing format and add a repo map (source repo → destination repo) at the same level as the current images/images-by-tag-regex, but that’s pretty clumsy.
I understand the concerns of not littering the CLI with all kind of options. But in this case couldn't it be said that the current way is the default way and when you want the namespace of the source repository to be respected is actually an option?
So instead of --scoped-without-registry add on option --keep-namespace
I understand this doesn't make the mistake go away, but it makes the tool much more useful.
A friendly reminder that this PR had no activity for 30 days.
@vrothberg Can you explain what the right direction would be here? For me the use case makes also sense and i would continue to work on it if thats ok for @c0ffee
For CLI, an option (sadly it has to be an option) to do no mapping and just let the user specify a destination repo, per the previous comment.
For YAML, I’m not immediately sure. It would be possible to keep the existing format and add a repo map (source repo → destination repo) at the same level as the current
images/images-by-tag-regex, but that’s pretty clumsy.
@PG2000, that looks like a good starting point to me.
A friendly reminder that this PR had no activity for 30 days.