Skip to content

Support dual Docker registry environment variables for Kubernetes deployments#176

Closed
Copilot wants to merge 3 commits intodevelopfrom
copilot/fix-175
Closed

Support dual Docker registry environment variables for Kubernetes deployments#176
Copilot wants to merge 3 commits intodevelopfrom
copilot/fix-175

Conversation

Copy link

Copilot AI commented Aug 28, 2025

This PR adds support for separate Docker registry URLs to enable efficient Kubernetes deployments where internal cluster communication can use ClusterIP while external clients receive publicly accessible registry URLs.

Problem

In Kubernetes deployments, the catalog service needed to:

  1. Push/pull Docker images efficiently using internal cluster networking (ClusterIP)
  2. Provide external clients with publicly accessible registry URLs for image references

Previously, only a single docker_registry_host environment variable was supported, forcing a choice between internal efficiency and external accessibility.

Solution

Added support for a second environment variable docker_registry_client_host that works alongside the existing docker_registry_host:

  • docker_registry_host - Used for internal Docker operations (push/pull) within the cluster
  • docker_registry_client_host - Used for client-facing image names returned via API calls

Configuration Example

# Internal cluster registry for efficient operations
export docker_registry_host="internal-registry.cluster.local:5000"
# External registry URL accessible to clients  
export docker_registry_client_host="registry.example.com"

Backward Compatibility

When only docker_registry_host is configured, it serves both purposes, maintaining full backward compatibility with existing deployments.

Changes Made

  • Updated deployment configuration template to support the new environment variable
  • Modified controller to handle dual registry configuration with fallback logic
  • Updated registrar to use appropriate registry for each operation type
  • Added comprehensive unit and integration tests
  • Updated documentation and examples

The implementation ensures that Docker images are built and tagged with client-accessible names while push operations use the most efficient internal network path.

Fixes #175.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Author

Copilot AI commented Aug 28, 2025

@bio-boris 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI and others added 2 commits August 28, 2025 19:35
…client URLs

Co-authored-by: bio-boris <1258634+bio-boris@users.noreply.github.com>
Co-authored-by: bio-boris <1258634+bio-boris@users.noreply.github.com>
Copilot AI changed the title [WIP] Support 2 env vars for registry URL Support dual Docker registry environment variables for Kubernetes deployments Aug 28, 2025
Copilot AI requested a review from bio-boris August 28, 2025 19:38
@bio-boris bio-boris closed this Aug 28, 2025
@bio-boris bio-boris deleted the copilot/fix-175 branch September 10, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support 2 env vars for registry URL

2 participants