Description of problem:
The `oc adm migrate icsp` command only generates the IDMS for first ICSP in the YAML file.
Version-Release number of selected component (if applicable):
4.15,4.16
How reproducible:
100%
Steps to Reproduce:
The oc-mirror command generated an imageContentSourcePolicy.yaml file after mirroring the images which has below content: ~~~ --- apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: generic-0 spec: repositoryDigestMirrors: - mirrors: - registry.dpateriy.lab.example.com:8443/ubi8 source: registry.redhat.io/ubi8 --- apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: release-0 spec: repositoryDigestMirrors: - mirrors: - registry.dpateriy.lab.example.com:8443/openshift/release source: quay.io/openshift-release-dev/ocp-v4.0-art-dev - mirrors: - registry.dpateriy.lab.example.com:8443/openshift/release-images source: quay.io/openshift-release-dev/ocp-release ~~~ When I tried running `oc adm migrate icsp` command to migrate, it only generated the IDMS for the first ICSP i.e., generic-0. ~~~ $ ./oc adm migrate icsp ./oc-mirror-workspace/results-1720542158/imageContentSourcePolicy.yaml --dest-dir . wrote ImageDigestMirrorSet to imagedigestmirrorset_generic-0.1509966966034800745.yaml $ cat imagedigestmirrorset_generic-0.1509966966034800745.yaml apiVersion: config.openshift.io/v1 kind: ImageDigestMirrorSet metadata: name: generic-0 spec: imageDigestMirrors: - mirrors: - registry.dpateriy.lab.example.com:8443/ubi8 source: registry.redhat.io/ubi8 ~~~
Actual results:
It generated the IDMS for first ICSP, it does not check the complete file for other ICSPs.
Expected results:
oc adm migrate icsp command should generate the IDMS for all the ICSPs defined in a single YAML file as the imageContentSourcePolicy.yaml is generated by oc-mirror itself.
Additional info:
- duplicates
-
OCPNODE-2281 If there are several ICSP objects in a single file, only the first object in the file is taken into account when converting ICSP to IDMS.
- Closed