openshift-dd-ext
openshift-dd-ext copied to clipboard
Container Registry shown on openshift extension is different to the actually environment
The container registry of the current project context seems to get by "oc registry info" which is different to the docker registry actually used in my environment. Is there any way to change the container registry field by myself?
I am using the following command to upload a docker image to openshift image stream:
docker build -t docker-registry-default.xxxxxx.xxxxxx.org/<project_name>/<image_name>:
Docker Desktop Openshift extension:
Logging to docker-registry.default.svc:5000...
info: Using internal registry hostname docker-registry.default.svc:5000
W0812 12:17:15.903195 8796 helpers.go:151] Defaulting of registry auth file to "${HOME}/.docker/config.json" is deprecated. The default will be switched to podman config locations in the future version.
Saved credentials for docker-registry.default.svc:5000
Creating image stream <image_name>...
Image stream <image_name> already exists, proceeding...
Tagging docker-registry.default.svc:5000/<project_name>/<image_name>:
I have indeed noticed oc registry info returns docker-registry.default.svc:5000 for some contexts, which is never going to work. We cannot yet set a custom registry URL but we'll certainly work on it.
Can your docker-registry-default.xxxxxx.xxxxxx.org be inferred by any other command?
No. The Docker registry is provided by my Openshift administrator. I haven't found any command to display the correct docker registry.
Hey @fbricon I'd like to work on this, but it kinda looks like a dead-end. Do you recommend this issue for a first-time contributor?
Well I wonder if brutally ignoring all "docker-registry.default.svc" registries would be OK. i.e. Is there a legit case where OpenShift clusters (maybe local ones?) would use docker-registry.default.svc? @dgolovin WDYT? If that's the case that'd be an easy solution
@fbricon TLDR we should provide the way to override registry host:port no matter if .svc domains are legit or are not. There should be mapping in config cluster-url => registry url.
I am not a OpenShift/Kubernetes admin to rule out using anything containing .cvs as a internal dns record for service. It seams a legit way to to use oc registry info to get default value for a registry host name. CRC for example returns default-route-openshift-image-registry.apps-crc.testing and it has no .cvs in it.
I would say we let user to judge if manual configuration required and provide the way to override registry host:port for specific cluster URL.