Skip to content

fix(helm): allow host[:port][/path] form in global.imageRegistry schema#4686

Merged
waleedlatif1 merged 1 commit into
stagingfrom
waleedlatif1/helm-imageregistry-schema
May 21, 2026
Merged

fix(helm): allow host[:port][/path] form in global.imageRegistry schema#4686
waleedlatif1 merged 1 commit into
stagingfrom
waleedlatif1/helm-imageregistry-schema

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented May 21, 2026

Summary

  • Drop `format: hostname` from `global.imageRegistry` in `helm/sim/values.schema.json` — JSON Schema's hostname format (RFC 1123) forbids `/`, which rejected the host+path form used by Artifactory virtual repos, Harbor projects, GCR (`gcr.io/project-id`), and ECR-with-namespace.
  • The chart's image helper (`_helpers.tpl`) already renders `{registry}/{repository}:{tag}` and supports the host+path form — only the schema was blocking it.
  • Matches the bitnami common-chart convention: validate `imageRegistry` as a plain string, defer to Docker for the actual reference parse.

Type of Change

  • Bug fix

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

The values.schema.json constrained global.imageRegistry to JSON Schema
hostname format (RFC 1123), which forbids '/'. That rejected the
host+path form required by Artifactory virtual repos, Harbor projects,
GCR (gcr.io/project-id), and ECR-with-namespace — all of which the
chart's image-rendering helper already supports (it prints '%s/%s:%s').

Drop the format constraint and document the supported shapes. Matches
the bitnami common-chart convention of validating image registry as a
plain string and deferring to Docker for the actual reference parse.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 21, 2026 12:24am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented May 21, 2026

PR Summary

Low Risk
Low risk: schema-only change that broadens accepted global.imageRegistry values and does not alter rendered manifests beyond allowing previously-rejected inputs.

Overview
Helm chart values validation is relaxed for global.imageRegistry by removing the JSON Schema format: hostname constraint and updating the description to explicitly support host[:port][/path] registries (e.g., Artifactory/Harbor/GCR/ECR namespace forms).

This unblocks helm lint/install for registries that include a path segment while keeping the value type as a simple string.

Reviewed by Cursor Bugbot for commit 05c2e19. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Greptile Summary

This PR removes "format": "hostname" from the global.imageRegistry JSON Schema property in the Helm chart's values.schema.json, replacing it with an expanded description. The fix unblocks users whose registry addresses include a path component (Artifactory virtual repos, Harbor projects, GCR, ECR-with-namespace), which RFC 1123 hostname validation rejects.

  • Drops format: hostname from imageRegistry so registries in host/path form pass schema validation; the description now documents the accepted host[:port][/path] pattern.
  • The _helpers.tpl template already concatenates registry + repository + tag correctly, so no template logic changes are needed.

Confidence Score: 5/5

Safe to merge — single-line schema constraint removal with no runtime logic changes.

The change removes one overly strict format keyword from a single JSON Schema field and replaces it with a more descriptive string. The template logic that consumes imageRegistry is unchanged, and the fix correctly aligns schema validation with what Docker's image reference parser already accepts.

No files require special attention.

Important Files Changed

Filename Overview
helm/sim/values.schema.json Removes format: hostname from global.imageRegistry; adds a descriptive comment clarifying the accepted host[:port][/path] form. Change is minimal and correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["helm install / helm upgrade"] --> B["values.schema.json validation"]
    B --> C{{"global.imageRegistry set?"}}
    C -- "No" --> D["Use default (no registry prefix)"]
    C -- "Yes" --> E{{"Before this PR: format: hostname check"}}
    E -- "host only (registry.example.com)" --> F["✅ Passes"]
    E -- "host/path (gcr.io/project-id)" --> G["❌ Rejected — / not allowed by RFC 1123"]
    C -- "Yes" --> H{{"After this PR: type: string only"}}
    H -- "host only" --> I["✅ Passes"]
    H -- "host:port" --> J["✅ Passes"]
    H -- "host/path" --> K["✅ Passes"]
    F --> L["_helpers.tpl renders: registry/repository:tag"]
    I --> L
    J --> L
    K --> L
Loading

Reviews (1): Last reviewed commit: "fix(helm): allow host[:port][/path] form..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit 48cf200 into staging May 21, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/helm-imageregistry-schema branch May 21, 2026 00:52
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.

1 participant