Bug 1957222

Summary: Add internal option for registry info
Product: OpenShift Container Platform Reporter: Praveen Kumar <prkumar>
Component: Test InfrastructureAssignee: Steve Kuznetsov <skuznets>
Status: CLOSED UPSTREAM QA Contact: Mike Fiedler <mifiedle>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8CC: mifiedle
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-05 14:05:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Praveen Kumar 2021-05-05 12:11:51 UTC
If the cluster have publicly exposed registry then following happen
when we do a build and tag to localimage.

```
$ oc registry info
default-route-openshift-image-registry.apps-crc.testing

$ cat Dockerfile  | oc -n demo new-build -D - --to localimage:latest
--> Found container image 388056c (3 weeks old) from Docker Hub for "busybox:latest"
[...]
--> Success

$ oc get is localimage -oyaml
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  annotations:
    openshift.io/generated-by: OpenShiftNewBuild
  name: localimage
  namespace: demo
spec:
  lookupPolicy:
    local: false
status:
  dockerImageRepository: image-registry.openshift-image-registry.svc:5000/demo/localimage
  publicDockerImageRepository: default-route-openshift-image-registry.apps-crc.testing/demo/localimage
  tags:
  - items:
    - created: "2021-04-30T03:56:42Z"
      dockerImageReference: image-registry.openshift-image-registry.svc:5000/demo/localimage@sha256:ba7e3310588dfd7198f31feda89c15f5fb8bc5c847bcace6c552df016a5d8603
      generation: 1
      image: sha256:ba7e3310588dfd7198f31feda89c15f5fb8bc5c847bcace6c552df016a5d8603
    tag: latest
```

As per test the registry info is what stored as registryHost and
then compare it with Tag[0].DockerImageReference which only have
internal registy URI.

This patch add --internal option for registry info so that
registryHost also have internal registry details.

Comment 11 Mike Fiedler 2021-08-05 14:05:50 UTC
Marking e2e bug as closed to avoid having to drop it from subsequent advisories.