convertDockerImageReference takes an image API DockerImageReference value and returns a reference we can actually use; currently OpenShift stores the cluster-internal service IPs here, which are unusable from the outside.
(ref string)
| 150 | // convertDockerImageReference takes an image API DockerImageReference value and returns a reference we can actually use; |
| 151 | // currently OpenShift stores the cluster-internal service IPs here, which are unusable from the outside. |
| 152 | func (c *openshiftClient) convertDockerImageReference(ref string) (string, error) { |
| 153 | _, repo, gotRepo := strings.Cut(ref, "/") |
| 154 | if !gotRepo { |
| 155 | return "", fmt.Errorf("Invalid format of docker reference %q: missing '/'", ref) |
| 156 | } |
| 157 | return reference.Domain(c.ref.dockerReference) + "/" + repo, nil |
| 158 | } |
| 159 | |
| 160 | // These structs are subsets of github.com/openshift/origin/pkg/image/api/v1 and its dependencies. |
| 161 | type imageStream struct { |
no test coverage detected