-
Feature Request
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
False
-
None
-
False
-
Not Selected
-
-
-
-
1. Proposed title of this feature request
- oc-mirror configuration of target repo/tag in the mirroring of additionalImages
- Option to configure target repo/tag
2. What is the nature and description of the request?
When doing image mirroring using the `oc` client tool, we have full control of what the namespace/repo/tag of the image will be in the target registry. Like in following example where image `[docker.io/library/busybox:latest]` (http://docker.io/library/busybox:latest) is mirrored to target registry as `${MIRROR_REGISTRY}/jukosone/test1/foo/bar/busy:test`
- Mirror from source registry to local file system:
$ oc image mirror \ -a /root/configs/pull-secret.json \ docker.io/library/busybox:latest \ file://test1/busybox:latest
- Mirror from local file system to target registry:
$ oc image mirror \ -a /root/configs/pull-secret.json \ file://test1/busybox:latest \ ${MIRROR_REGISTRY}/jukosone/test1/foo/bar/busy:test
Similar cannot be achieved when using `oc-mirror` based mirroring; there is no option for a user to define a repository/tag, but those are permanently fixed to the same as in the source.
For example:
$ cat imagesetconfig.yaml apiVersion: [mirror.openshift.io/v1alpha2](http://mirror.openshift.io/v1alpha2) kind: ImageSetConfiguration mirror: additionalImages: name: [docker.io/library/busybox:latest](http://docker.io/library/busybox:latest)
- Mirror from source registry to local filesystem:
$ oc-mirror \ --config imagesetconfig.yaml \ file://archive
- Mirror from local filesystem to target registry:
$ oc-mirror \ --from archive/ \ docker://${MIRROR_REGISTRY}/jukosone/test2/foo/bar
Results to:
$ cat imageContentSourcePolicy.yaml apiVersion: [operator.openshift.io/v1alpha1](http://operator.openshift.io/v1alpha1) kind: ImageContentSourcePolicy metadata: name: generic-0 spec: repositoryDigestMirrors: * mirrors: * ocp-team-local.artifactory-example.com:443/jukosone/test2/foo/bar/library source: [docker.io/library](http://docker.io/library)
$ cat mapping.txt
[docker.io/library/busybox@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79=ocp-team-local.artifactory-example.com:443/jukosone/test2/foo/bar/library/busybox:latest](http://docker.io/library/busybox@sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79=ocp-team-local.artifactory-example.com:443/jukosone/test2/foo/bar/library/busybox:latest)
Where repo/tag is library/busybox:latest and user cannot affect the naming here.
Add a feature to oc-mirror that enables a user to configure image namespace/repo/tag?
We can use mirror.operators.targetCatalog and mirror.operators.targetTag. But it is only for operators so we want to be able to export this option to all areas like additionalImages for example.
3. Why does the customer need this?
- It is not practical to use oc-mirror in additional image mirroring due to lack of reconfigurability.
4. List any affected packages or components.
- oc-mirror
- depends on
-
CLID-148 Evaluate RFE-4798
- Closed