Skip to content

fix(helm): ignore dots after first path segment when detecting image registry - #20695

Merged
JStickler merged 7 commits into
grafana:mainfrom
Bastizeit:fix/helm-image-registry-detection
Mar 10, 2026
Merged

fix(helm): ignore dots after first path segment when detecting image registry#20695
JStickler merged 7 commits into
grafana:mainfrom
Bastizeit:fix/helm-image-registry-detection

Conversation

@Bastizeit

@Bastizeit Bastizeit commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

What:

The Helm chart’s image builder currently decides “repository already includes a registry” by checking for a . anywhere in the repository string. This incorrectly treats repositories like mirrored/docker.io/grafana/loki as already fully-qualified, so the configured registry (e.g. private.registry.com) is not prefixed.

Why:

Users who mirror upstream images under a path containing docker.io (or similar) commonly set:

image.registry: private.registry.com
image.repository: mirrored/docker.io/...
Today that results in images being rendered without the private registry prefix, causing pulls to fail or to hit the wrong registry.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
@Bastizeit
Bastizeit requested a review from a team as a code owner February 5, 2026 15:37
@CLAassistant

CLAassistant commented Feb 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Bastizeit

Copy link
Copy Markdown
Contributor Author

@Jayclifford345 are you the right one to tag for a review? It's my first contribution so if there is anything missing just let me know :)

@JStickler

JStickler commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Hi @Bastizeit Right now the Loki Helm Chart is sort of in limbo. The Loki Helm Community maintainers launched the Grafana-community/helm-charts on January 30th, and are planning to fork the Loki Helm Chart to the new repo on March 16th. I’ll see if I can get someone’s attention to take a look at your PR.

@jkroepke jkroepke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

cc @JStickler

Signed-off-by: Bastizeit <54327601+Bastizeit@users.noreply.github.com>
@Bastizeit

Copy link
Copy Markdown
Contributor Author

@JStickler @jkroepke I'm curious if there is anything missing to merge the change in?

@JStickler
JStickler merged commit 1b97cbf into grafana:main Mar 10, 2026
99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants