-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to pull container images from the OpenShift internal registry #22140
Comments
@cgruver makes sense. Do you know if the trusted certificates path can be specified in podman configuration? |
We can pull images from the OpenShift registry in the following steps:
The OpenShift registry certificate can be put into |
@tolusha this is important information. Isn't the registry certificate already included in the OpenShift trusted certificate bundle? |
It is even better, the certificate is already mounted into a container:
|
Ok so in UDI we could have a simbolic link like the following one to make things work automatically. ln -s /var/run/secrets/kubernetes.io/serviceaccount/ca.crt \
/etc/docker/certs.d/image-registry.openshift-image-registry.svc:5000/ca.crt |
Or having the dashboard doing that when it creates the kubeconfig. |
I vote for having the dashboard handle it. A lot of users will build their own tools image rather than using UDI. So, that would be one less thing to have to build into their custom dev tools images. |
@l0rd it looks like the symlink approach not going to work due to lack of permissions, basically, |
we can technically introduce another endpoint on the UD end that will do the Draft PR - eclipse-che/che-dashboard#785 The problem that I found is that for some reason, login not always persist between terminal sessions e.g. if you login in one terminal window and open another one podman pull would not always work |
The PR has been merged. |
after some investigation and discussions, the podman login injection is working correctly and the following command is executed during workspace startup:
However, in order to pull the image from the internal registry one still needs to explicitly provide @benoitf do you happen to know if there is a mechanism we can use for configuring podman via file / env var to point to the right certificate that would allow executing |
@ibuziuk use the |
@l0rd suggested smth. similar #22140 (comment) |
|
@benoitf tried the approach with symlink but it does not seem to work
Checking the file permissions, but https://github.com/containers/image/blob/main/docs/containers-certs.d.5.md#directory-structure does not say anything about that |
@ibuziuk you are linking the external routes certs CA ( If I run the following commands on developer sandbox export CERTS_SRC="/var/run/secrets/kubernetes.io/serviceaccount"
export CERTS_DEST="$HOME/.config/containers/certs.d/image-registry.openshift-image-registry.svc:5000"
mkdir -p ${CERTS_DEST} && \
ln -s ${CERTS_SRC}/service-ca.crt ${CERTS_DEST}/service-ca.crt && \
podman pull image-registry.openshift-image-registry.svc:5000/openshift/cli:latest I get In general we should link both certificates. |
PR has been sent - eclipse-che/che-dashboard#851 |
PR has been merged eclipse-che/che-dashboard#851 @cgruver could you please clarify how you are using the images from the internal registry from the Eclipse Che workspace? Would be really interested in knowing the use-case |
@ibuziuk (I'm not Charro but I'm on a team they've worked with) We're building containers within Dev Spaces. Unless $HOME is persistent, we'll lose those containers when the workspace restarts-- so we push them to the internal registry. |
Describe the bug
Within a running workspace,
podman
is able to pull images from external registries likequay.io
but is unable to pull images from the internal OpenShift Registry.The internal registry certificate is not trusted, and the workspace user is not authorized.
Che version
7.63@latest
Steps to reproduce
Create a workspace with https://github.com/eclipse-che-demo-app/che-demo-app.git
Start a terminal
Execute:
Observe success:
Execute:
Observe error:
Ignore TLS:
Observe authentication error:
Expected behavior
Expect
podman
configuration to be setup for interacting with the internal image registry.Runtime
OpenShift
Screenshots
No response
Installation method
OperatorHub
Environment
macOS
Eclipse Che Logs
No response
Additional context
OpenShift is OKD 4.12
The text was updated successfully, but these errors were encountered: