Skip to content

fix: make TEKTON_REGISTRY_OVERRIDE apply to all images#3754

Open
sybernatus wants to merge 1 commit into
tektoncd:mainfrom
sybernatus:main
Open

fix: make TEKTON_REGISTRY_OVERRIDE apply to all images#3754
sybernatus wants to merge 1 commit into
tektoncd:mainfrom
sybernatus:main

Conversation

@sybernatus

@sybernatus sybernatus commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Changes

Previously the override only rewrote images already present in the per-component IMAGE_* env var map, leaving the defaults baked into component manifests untouched, and existing TektonInstallerSets never refreshed when only the registry override changed on an existing install.

TEKTON_REGISTRY_OVERRIDE was introduced in #2863 (docs in #2865, originally requested in #2684 / #2855) but only rewrote images that already had a matching per-image IMAGE_* env var set. This is exactly the gap reported in #3270 ("Rewrite image registry Not working", still open) and previously in #2873 ("only one of the resulting containers correctly refers to the override registry, all other pods still refer to the default location").

This PR makes TEKTON_REGISTRY_OVERRIDE alone sufficient to rewrite every image, and fixes existing installs to pick up the change automatically:

  • replaceContainerImages (Deployment/StatefulSet/Job containers), replaceStepsImages (Task/ClusterTask steps) and replaceStepActionImages (StepAction) now fall back to rewriting the registry host of the image already present in the manifest when no per-image env var matches it, instead of leaving it untouched. Tekton variable substitutions ($(params.foo)) are explicitly excluded from this fallback since they aren't literal image references.
  • The TektonInstallerSet spec-hash (specHashInput) now includes TEKTON_REGISTRY_OVERRIDE, so changing it on an existing install triggers a refresh of the installer sets on the next reconcile instead of requiring a manual kubectl delete tektoninstallerset.
  • docs/AirGapImageConfiguration.md updated to reflect the new behavior.

Note: #3270 also reports that some arg:-based image overrides (IMAGE_TRIGGERS_ARG__EL_IMAGE, IMAGE_PIPELINES_ARG__WORKINGDIRINIT_IMAGE) don't apply even when set explicitly. That's a separate, pre-existing bug in replaceContainersArgsImage unrelated to the registry-override fallback and isn't addressed here.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Run make test lint before submitting a PR (make test-unit passes; make lint-go could not download golangci-lint in this sandbox - checksum mismatch fetching the release binary, unrelated to this change)
  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices

See the contribution guide for more details.

Release Notes

fix: TEKTON_REGISTRY_OVERRIDE now applies to every image, including component defaults with no matching IMAGE_* env var, and existing installs refresh automatically when the value changes.

Previously the override only rewrote images already present in the
per-component IMAGE_* env var map, leaving the defaults baked into
component manifests untouched, and existing TektonInstallerSets never
refreshed when only the registry override changed on an existing
install.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 17, 2026
@tekton-robot
tekton-robot requested review from divyansh42 and khrm July 17, 2026 07:24
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm after the PR has been reviewed.
You can assign the PR to them by writing /assign @khrm in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 17, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.61%. Comparing base (a5da4e5) to head (721b3e4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3754      +/-   ##
==========================================
+ Coverage   25.55%   25.61%   +0.06%     
==========================================
  Files         448      448              
  Lines       23317    23330      +13     
==========================================
+ Hits         5958     5976      +18     
+ Misses      16674    16671       -3     
+ Partials      685      683       -2     
Flag Coverage Δ
unit-tests 25.61% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anithapriyanatarajan

Copy link
Copy Markdown
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants