Skip to content

Set Image and Registry Seperately in Otel Collector#1070

Merged
aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
afscrome:otel-collector-seperate-registry-and-image
Jan 28, 2026
Merged

Set Image and Registry Seperately in Otel Collector#1070
aaronpowell merged 1 commit into
CommunityToolkit:mainfrom
afscrome:otel-collector-seperate-registry-and-image

Conversation

@afscrome
Copy link
Copy Markdown
Contributor

Rather than fudge the registry into the image name, set the registry property explicitly.

For some context of why this matters to me - my org's build agents have locked down firewalls, and we have to rewrite public registries to internal mirrors - we do this by looking at the Registry property in a BeforeStart hook - see more at https://youtu.be/u0iK6Bv5BZ0?si=AtJ_DmYCn1t0Mq5f&t=1124 .

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Code follows all style conventions

Other information

Copilot AI review requested due to automatic review settings December 17, 2025 22:26
@afscrome afscrome requested a review from martinjt as a code owner December 17, 2025 22:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the OpenTelemetry Collector integration to separate the registry and image properties when configuring the container, enabling registry rewriting in BeforeStart hooks for organizations with locked-down firewalls that need to redirect to internal mirrors.

Key Changes

  • Changed from passing the full image path (including registry) via WithImage to separating the registry and image using WithImage and WithImageRegistry respectively
  • Now uses settings.Image and settings.Registry separately instead of the computed settings.CollectorImage property

Rather than fudge the registry into the image name, set the registry property explicitly.
@afscrome afscrome force-pushed the otel-collector-seperate-registry-and-image branch from b859886 to becf466 Compare December 17, 2025 22:36
@afscrome
Copy link
Copy Markdown
Contributor Author

SurrealDb test failures seem unrelated to this change.

@aaronpowell
Copy link
Copy Markdown
Member

SurrealDb test failures seem unrelated to this change.

re-ran and tests pass.

@github-actions github-actions Bot added the Stale label Dec 23, 2025
@github-actions github-actions Bot closed this Dec 26, 2025
@afscrome
Copy link
Copy Markdown
Contributor Author

afscrome commented Jan 5, 2026

@aaronpowell Can you reopen this. @martinjt Do you mind reviewing?

@aaronpowell aaronpowell reopened this Jan 12, 2026
@aaronpowell aaronpowell removed the Stale label Jan 12, 2026
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.

4 participants