OCPBUGS-84253: improve JSON unmarshalling for secret decoding#5877
Conversation
This tolerates the credHelpers and credsStore fields which should be ignored and discarded after decoding. Assisted-By: Claude Sonnet 4.5
|
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: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
/jira cherrypick OCPBUGS-79425 |
|
@cheesesashimi: Jira Issue OCPBUGS-79425 has been cloned as Jira Issue OCPBUGS-84253. Will retitle bug to link to clone. WARNING: Unexpected sprint field type []interface {} on source issue. Please update sprint manually on clone. /retitle OCPBUGS-84253: improve JSON unmarshalling for secret decoding 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@cheesesashimi: This pull request references Jira Issue OCPBUGS-84253, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@cheesesashimi: This pull request references Jira Issue OCPBUGS-84253, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/cherrypick release-4.20 |
|
@cheesesashimi: once the present PR merges, I will cherry-pick it on top of 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. |
isabella-janssen
left a comment
There was a problem hiding this comment.
/label backport-risk-assessed
/lgtm
This backport looks good.
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cheesesashimi, isabella-janssen The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
1 similar comment
|
/retest-required |
|
@cheesesashimi: The following test 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. |
|
/override ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-upgrade ci/prow/e2e-hypershift Overriding as these are known issues affecting CI, unrelated to this PR. |
|
@djoshy: Overrode contexts on behalf of djoshy: ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-hypershift 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. |
There was a problem hiding this comment.
Pre-merge Verification: Passed
Cluster version: 4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest
Executed test case OCP-88709 - Using credHelpers in global pull-secret
MCO handles pull secrets with credsStore/credHelpers correctly: propagates them to nodes, doesn't degrade, and cleanly reverts when removed. No degradation happened in the machine-config ClusterOperator
Steps Performed:
- Saved original pull secret to /tmp/pull-secret.json
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get secret pull-secret -n openshift-config --template="{{index .data \".dockerconfigjson\" | base64decode}}" > /tmp/pull-secret.json
- Modified pull secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ jq '. + {"credsStore": "fake-store", "credHelpers": {"fake.registry.example.com": "fake-helper"}}' /tmp/pull-secret.json > /tmp/pull-secret-credhelpers.json
- Applied modified secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc set data secret pull-secret -n openshift-config --from-file=.dockerconfigjson=/tmp/pull-secret-credhelpers.json
secret/pull-secret data updated
- Verified on worker node
...
},
"credsStore": "fake-store",
"credHelpers": {
"fake.registry.example.com": "fake-helper"
}
}
- Verified MCO health
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get co machine-config
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
machine-config 4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest True False False 49m
- Restored original pull secret
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc set data secret pull-secret -n openshift-config --from-file=.dockerconfigjson=/tmp/pull-secret.json
secret/pull-secret data updated
- Verified on worker node
...
"quay.io/metal3-io": {
"auth": "ZHVhbndlaTMzOmRIK3gzaytvcXlyQ1AvNkFIdE5acmsxeW5LcXVCYnpMR3JaNFdsQS9YdkJrZHAzUmFxVUduQ1ovWkxvRVhMRVQK"
},
"quay.io/openshift-art": {
"auth": "b3BlbnNoaWZ0LWFydCtmYmNfZnJhZ21lbnRfcHVzaGVyOkY0VVdNRVFQRjVCNjZGTDJLMEg1NjlaVTZIVVlNSDU5Skw1UlhEREk1OERUVzU1QjNSQjRRMjQ2QzNKVFhLCg=="
}
}
}
- Verified MCO health
harshpat@harshpat-thinkpadp1gen4i:~/Downloads$ oc get co machine-config
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
machine-config 4.21.0-0-2026-04-30-044908-test-ci-ln-0pz1k6k-latest True False False 59m
Executed these test cases too:
success "[sig-mco] MCO Author:sregidor-NonPreRelease-Longduration-Medium-57595-[OnCLayer] Use empty pull-secret[Disruptive] [Serial]"
SUCCESS! 8m49.637678232s "[sig-mco] MCO ocb Author:sregidor-NonPreRelease-Medium-79172-OCB Inherit from global pull secret if baseImagePullSecret field is not specified [Disruptive] [Serial]"
SUCCESS! 3m57.140869402s "[sig-mco] MCO Author:mhanss-NonPreRelease-Longduration-High-42680-[P2] change pull secret in the openshift-config namespace [Serial]"
success "[sig-mco] MCO ocb Author:sregidor-ConnectedOnly-Longduration-NonPreRelease-High-83137-OCB use OutputImage CurrentImagePullSecret [Disruptive] [Serial]"
|
/verified by @HarshwardhanPatil07 |
|
@HarshwardhanPatil07: This PR has been marked as verified by 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 openshift-eng/jira-lifecycle-plugin repository. |
a2e5802
into
openshift:release-4.21
|
@cheesesashimi: Jira Issue Verification Checks: Jira Issue OCPBUGS-84253 Jira Issue OCPBUGS-84253 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@cheesesashimi: #5877 failed to apply on top of branch "release-4.20": 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. |
This is a manual backport of #5813 since the changes could not be applied cleanly.