-
Notifications
You must be signed in to change notification settings - Fork 6.8k
cri-o: fix duplicate top-level "auths" keys in registry config template #12845
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
base: master
Are you sure you want to change the base?
cri-o: fix duplicate top-level "auths" keys in registry config template #12845
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: accuROAMC 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 |
|
|
|
Welcome @accuROAMC! |
|
Hi @accuROAMC. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
The config.json.j2 template was generating invalid JSON when multiple
crio_registry_auth entries were defined, resulting in multiple top-level
"auths" objects being rendered, e.g.:
{
"auths": { "registry1": { "auth": "xxxx" } },
"auths": { "registry2": { "auth": "yyyy" } }
}
This change moves the loop inside the "auths" object so that all registries
are rendered as siblings under a single "auths" key, producing valid JSON:
{
"auths": {
"registry1": { "auth": "xxxx" },
"registry2": { "auth": "yyyy" }
}
}
5193ca7 to
6bcc68a
Compare
|
/ok-to-test This looks fine but can you provide a release-note explaining the problem fixed ? |
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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. |
Did that - hope it is ok. |
/kind bug
What this PR does / why we need it:
The config.json.j2 template for CRI-O was generating invalid JSON when multiple
crio_registry_authentries were defined, resulting in multiple top-level"auths" objects being rendered, for example:
{ "auths": { "registry1": { "auth": "xxxx" } }, "auths": { "registry2": { "auth": "yyyy" } } }This change moves the loop inside a single "auths" object so that all registries
are rendered as siblings under one top-level "auths" key, producing valid Docker
config JSON:
{ "auths": { "registry1": { "auth": "xxxx" }, "registry2": { "auth": "yyyy" } } }Which issue(s) this PR fixes:
None filed — this fixes a template bug.
Special notes for your reviewer:
This is a straightforward template fix; no additional testing required beyond
normal CI.
Does this PR introduce a user-facing change?:
release-note
Fixed an issue in the config.json.j2 template where the CRI-O registry authentication configuration could render invalid JSON when multiple
crio_registry_authentries were defined, resulting in duplicate top-levelauthskeys in the generated config.