Description
Bug description
If gitpod installation contains image pull secret for a registry say myreg.com
and user tries to configure the same registry provider to pull private images then gitpod fails to pull the image.
This happens because gitpod tries to use the existing credentials of imagepull secrets rather than the credential provided by the user.
e.g. We have europe-docker.pkg.dev access credentials configured in preview env as part of image pull secret. When I create a project in preview env and use europe-docker.pkg.dev for my private images, gitpod does not use my credentials.
Steps to reproduce
This can be reproduced easily in preview env.
- Create a private google artifact registry in europe region such that the host is
europe-docker.pkg.dev
. - Create a service account and give it registry writer permission to your repo.
- Upload an image in your registry.
- Configure your repo with a .gitpod.yml which uses this image.
- Follow steps in Support private registries #8550 description.
The image build will fail.
NOTE: The image build will fail early if the changes of this PR Iare not included in your preview env.
Workspace affected
No response
Expected behavior
Image build should have worked and correct credentials should have been used.
Example repository
No response
Anything else?
No response