Bug 105607: [release-4.19] CPO does not propagate --registry-overrides to init containers it injects in HCP sub-resources - #9278
Conversation
…t containers Backports openshift#8509 and openshift#8824 to release-4.19: 1. Add support/util/registryoverride package with strict longest-prefix matching that correctly handles digest (@sha256:) and tag (:) separators, preventing false substring matches (e.g. "quay.io" matching "quay.io.example.com"). 2. Fix RegistryMirrorProviderDecorator.Lookup to use registryoverride.Replace instead of strings.Replace, eliminating the original substring-match bug. 3. Add imageprovider.NewWithRegistryOverrides to apply registry overrides to all component images at provider creation time, ensuring init containers (availability-prober) and other CPO sub-resources use overridden images. 4. Wire NewWithRegistryOverrides into the HCP controller reconcile loop so the control-plane release image provider applies overrides. Without this fix, CPO-managed init containers (e.g. availability-prober) retain original registry references, causing ValidatingAdmissionPolicies in Deny mode to block HCP creation in environments that restrict image sources.
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: avollmer-redhat The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@avollmer-redhat: The label(s) DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@avollmer-redhat: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/uncc @rtheis |
|
Closing — OCPBUGS-105607 has been closed as Won't Do. A cluster audit across all environments (INT, Stage, and all Prod geos) confirmed zero customer clusters are running OCP 4.19, only internal test/CI clusters. The 4.19 backport is no longer necessary. /close |
|
@avollmer-redhat: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Bug
https://issues.redhat.com/browse/OCPBUGS-105607
What
Backports #8509 and #8824 to
release-4.19.This is the same combined backport already merged to release-4.22, release-4.21, and open on release-4.20.
Why
The Control Plane Operator (CPO) uses
strings.Replacefor registry overrides, which:quay.iomatchingquay.io.example.com)@sha256:) vs tag (:) separatorsWithout this fix, ValidatingAdmissionPolicies in Deny mode block HCP creation in environments that restrict image sources to MCR/ACR, because CPO-managed init containers retain their original
quay.ioregistry references.Changes
support/util/registryoverridepackage with strict longest-prefix matchingRegistryMirrorProviderDecorator.Lookupto useregistryoverride.Replaceimageprovider.NewWithRegistryOverridesfor provider-level override applicationNewWithRegistryOverridesinto HCP controller reconcile loopTracking
/label backport-risk-assessed
/jira OCPBUGS-105607