Description of problem:
Oc-mirror create invalid format file of itms-oc-mirror.yaml when work with OCI image, when create itms from the file, hit error : oc create -f itms-oc-mirror.yaml The ImageTagMirrorSet "itms-operator-0" is invalid: spec.imageTagMirrors[0].source: Invalid value: "//app1/noo": spec.imageTagMirrors[0].source in body should match '^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$'
Version-Release number of selected component (if applicable):
oc-mirror version WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version. Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202403251146.p0.g03ce0ca.assembly.stream.el9-03ce0ca", GitCommit:"03ce0ca797e73b6762fd3e24100ce043199519e9", GitTreeState:"clean", BuildDate:"2024-03-25T16:34:33Z", GoVersion:"go1.21.7 (Red Hat 1.21.7-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
always
Steps to Reproduce:
1) Copy the operator as OCI format to localhost: `skopeo copy --all docker://registry.redhat.io/redhat/redhat-operator-index:v4.15 oci:///app1/noo/redhat-operator-index --remove-signatures` 2) Use following imagesetconfigure for mirror: cat config-multi-op.yaml kind: ImageSetConfiguration apiVersion: mirror.openshift.io/v1alpha2 mirror: operators: - catalog: oci:///app1/noo/redhat-operator-index packages: - name: odf-operator `oc-mirror --config config-multi-op.yaml file://outmulitop --v2` 3) Do diskTomirror : `oc-mirror --config config-multi-op.yaml --from file://outmulitop --v2 docker://ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi` 4) Create cluster resource with file: itms-oc-mirror.yaml `oc create -f itms-oc-mirror.yaml`
Actual results:
4) failed to create ImageTagMirrorSet oc create -f itms-oc-mirror.yaml The ImageTagMirrorSet "itms-operator-0" is invalid: spec.imageTagMirrors[0].source: Invalid value: "//app1/noo": spec.imageTagMirrors[0].source in body should match '^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$' cat itms-oc-mirror.yaml --- apiVersion: config.openshift.io/v1 kind: ImageTagMirrorSet metadata: creationTimestamp: null name: itms-operator-0 spec: imageTagMirrors: - mirrors: - ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi source: //app1/noo status: {}
Expected results:
4) succeed to create the cluster resource
- clones
-
OCPBUGS-31344 Oc-mirror get the wrong index.json and failed when ImageSetConfig containing OCI FBC
- Closed
- is cloned by
-
OCPBUGS-31530 Failed to create the catalog source pod with error: Pod is invalid: metadata.labels must be no more than 63 characters
- Closed
-
OCPBUGS-31608 Invalid idms files are being generated when imageSetConfig file does not have filtering based on channels for operators when mirroring from disk2mirror
- Closed
- links to
-
RHEA-2024:0041 OpenShift Container Platform 4.16.z bug fix update