This is a clone of issue OCPBUGS-10348. The following is the description of the original issue:
—
Description of problem:
Trivy community operator is not mirrored because the image address is malformed: "https://devopstales/v2/trivy-operator/manifests/2.4.1". I am under the impression that this is due to the fact that the image address in relatedImages parameter is not fully qualified: $ opm render registry.redhat.io/redhat/community-operator-index:v4.12 |jq -r 'select(.package == "community-trivy-operator") | select(.schema == "olm.bundle")' [...] "relatedImages": [ { "name": "", "image": "devopstales/trivy-operator:2.4.1" }, { "name": "", "image": "quay.io/openshift-community-operators/community-trivy-operator@sha256:e3652e68e1e569d7f40432fd8cbb7bfdc6738a116ecc1011c71a36f7ca5663c6"
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
$ cat <<EOF > imageset.yaml apiVersion: mirror.openshift.io/v1alpha2 kind: ImageSetConfiguration mirror: operators: - catalog: registry.redhat.io/redhat/community-operator-index:v4.11 packages: - name: community-trivy-operator channels: - name: stable EOF $ oc-mirror --config imageset.yaml file://mirror
Actual results:
Creating directory: mirror/oc-mirror-workspace/src/publish Creating directory: mirror/oc-mirror-workspace/src/v2 Creating directory: mirror/oc-mirror-workspace/src/charts Creating directory: mirror/oc-mirror-workspace/src/release-signatures backend is not configured in imageset.yaml, using stateless mode backend is not configured in imageset.yaml, using stateless mode No metadata detected, creating new workspace bundle : pinning related image devopstales/trivy-operator:2.4.1 to digest bundle : pinning related image devopstales/trivy-operator:2.4.1 to digest level=info msg=trying next host error=failed to do request: Head "https://devopstales/v2/trivy-operator/manifests/2.4.1": x509: certificate is valid for localhost, not devopstales host=devopstales error: error pinning images in catalog registry.redhat.io/redhat/community-operator-index:v4.11: failed to do request: Head "https://devopstales/v2/trivy-operator/manifests/2.4.1": x509: certificate is valid for localhost, not devopstales
Expected results:
operator is properly mirrored
Additional info:
I assume that "docker.io" should be automatically added to address when no registry is set. Trivy it's not the only community operator that doesn't specify the full url, so this issue probably affects other operators as well
- clones
-
OCPBUGS-10348 Community operator cannot be mirrored due to malformed image address
- Closed
- is blocked by
-
OCPBUGS-10348 Community operator cannot be mirrored due to malformed image address
- Closed
- links to