-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-56451: Use the ImageDigest SourcePolicy to configure image registry on bootstrap host #10073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-56451: Use the ImageDigest SourcePolicy to configure image registry on bootstrap host #10073
Conversation
|
@sadasu: This pull request references Jira Issue OCPBUGS-56451, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In 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 openshift-eng/jira-lifecycle-plugin repository. |
52046fe to
99d43aa
Compare
|
/cc @patrickdillon |
tthvo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the below steps to test this PR:
-
With the install-config block:
imageDigestSources: - mirrors: - ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release source: registry.build10.ci.openshift.org/ci-ln-wmr7tpk/release sourcePolicy: NeverContactSource - mirrors: - ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release source: registry.build10.ci.openshift.org/ci-ln-wmr7tpk/stable
-
Generating the ignition-configs:
./openshift-install create ignition-configs --dir=.
-
Check the content of bootstrap ignition:
cat ./bootstrap.ign | jq -r '.storage.files[] | select(.path=="/etc/containers/registries.conf") | .contents.source' | cut -d , -f2 | base64 -d
I did see the blocked field, but unfortunately, it is always false regardless of source policy. I have a few suggestions above that will help 🤔
|
With the suggestions above, I followed the same steps as #10073 (comment) and I can now see the correct $ cat ./bootstrap.ign | jq -r '.storage.files[] | select(.path=="/etc/containers/registries.conf") | .contents.source' | cut -d , -f2 | base64 -d
[[registry]]
location = "registry.build10.ci.openshift.org/ci-ln-wmr7tpk/release"
insecure = false
mirror-by-digest-only = true
blocked = true
[[registry.mirror]]
location = "ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release"
insecure = false
[[registry]]
location = "registry.build10.ci.openshift.org/ci-ln-wmr7tpk/stable"
insecure = false
mirror-by-digest-only = true
blocked = false
[[registry.mirror]]
location = "ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release"
insecure = false
|
+1, when the sourcePolicy is set to |
A new policy was added to the ImageDigestSource configuration that allows the user to specify policy when there is a failure pulling an image from the source. Update the image registry configuration on the bootstrap host with this SourcePolicy.
Update the image registry configuration with the newly added Image source policy field that specifies the fallback policy when image pull fails.
With the introduction of the fallback source policy when Image source and mirrors are specified, image registry configuration for ABI should be update to include that.
99d43aa to
7f87dd6
Compare
|
Side note: I just realized we can use struct as key in golang https://go.dev/blog/maps 🤣 wow, so much more to learn haha |
7f87dd6 to
be61527
Compare
be61527 to
4752371
Compare
|
@andfasano and @mresvanis could you PTAL? |
|
/test e2e-aws-ovn |
tthvo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
This worked for me 🥳 With the install-config snippet:
imageDigestSources:
- mirrors:
- ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release
source: registry.build10.ci.openshift.org/ci-ln-wmr7tpk/release
sourcePolicy: NeverContactSource
- mirrors:
- ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release
source: registry.build10.ci.openshift.org/ci-ln-wmr7tpk/stableThe following bootstrap registry config is generated:
cat ./bootstrap.ign | jq -r '.storage.files[] | select(.path=="/etc/containers/registries.conf") | .contents.source' | cut -d , -f2 | base64 -d
[[registry]]
location = "registry.build10.ci.openshift.org/ci-ln-wmr7tpk/release"
insecure = false
mirror-by-digest-only = true
blocked = true
[[registry.mirror]]
location = "ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release"
insecure = false
[[registry]]
location = "registry.build10.ci.openshift.org/ci-ln-wmr7tpk/stable"
insecure = false
mirror-by-digest-only = true
blocked = false
[[registry.mirror]]
location = "ec2-xxx.compute-1.amazonaws.com:5000/ci-ln-wmr7tpk/release"
insecure = false
|
/test e2e-aws-ovn |
|
@tthvo Thanks for helping to verify the generated content of /verified by @gpei |
|
@gpei: This PR has been marked as verified by In 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Changes look good also from ABI point of view |
|
@sadasu: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
02535f7
into
openshift:main
|
@sadasu: Jira Issue Verification Checks: Jira Issue OCPBUGS-56451 Jira Issue OCPBUGS-56451 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 In 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 openshift-eng/jira-lifecycle-plugin repository. |
|
Fix included in accepted release 4.21.0-0.nightly-2025-11-22-193140 |
A new policy was added to the ImageDigestSource configuration that allows the user to specify policy when there is a failure pulling an image from the source.
Update the image registry configuration on the bootstrap host with this SourcePolicy.