-
Notifications
You must be signed in to change notification settings - Fork 357
feat: allow namespace override per image (#4725) #4762
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
base: develop
Are you sure you want to change the base?
Conversation
|
The env var you are looking for is append this before supabase start and it will pull images from dockerhub |
|
The issue is not that I can’t set the registry. The issue is that the method I changed explicitly checks for This behavior is inherently necessary because Supabase does not re-publish all images under the For the
So if someone is using a custom pull-through cache (still using What my changes addMy changes introduce the possibility to override the namespace per image, so users can configure the correct namespace for cases like GitLab Dependency Proxy. For example, Kong can be fixed by setting: ExampleThe method
With the new namespace override, users can ensure the method returns valid image URLs even when images are not available under |
Pull Request Test Coverage Report for Build 21512622686Details
💛 - Coveralls |
Could you let me know which registry are you using? We have kong published under supabase namespace for GHCR and ECR. These are the only ones we support officially right now. We are only making an exception for |
|
Im using the GitLab Dependency Proxy, which acts as a pull-through cache for The only real workaround would be to set up and maintain a separate pull-through cache that targets a different upstream registry (e.g. GHCR or AWS ECR). However, that adds operational overhead (infrastructure + configuration + ongoing maintenance). Images required for running all services locallyI checked which images are needed to run all services locally and found the following list:
These are the configured image names the CLI uses. Why the current behavior breaks with GitLab Dependency ProxyThe old logic for constructing the image URL effectively enforced the namespace Proposed solutionWith the proposed code changes, the following environment variables can be used to ensure images are pulled from the correct namespaces:
Additionally, the following would be used to direct Supabase to use the GitLab Dependency Proxy: This will set the registry to something like: See: https://docs.gitlab.com/user/packages/dependency_proxy/#authenticate-within-cicd |
What kind of change does this PR introduce?
Feature
What is the current behavior?
There is currently no support for overriding the namespace used when resolving container image references.
This makes it impossible to pull certain images (e.g.
kong) via the GitLab CI Dependency Proxy, which only supports images fromdocker.io.Related issue: #4725
What is the new behavior?
This PR introduces support for per-image namespace configuration via environment variables such as
SUPABASE_INTERNAL_IMAGE_NAMESPACE_KONG=library.With this change, users can explicitly control the resolved image namespace, enabling images like
kongto be pulled through the GitLab CI Dependency Proxy.Additional context
The image resolution logic was updated to apply the configured namespace when constructing the full image reference, and tests were added to cover the new behavior.