-
Notifications
You must be signed in to change notification settings - Fork 242
OCPBUGS-60045: certrotation: exit when received cabundle is empty #2004
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-60045: certrotation: exit when received cabundle is empty #2004
Conversation
@vrutkovs: This pull request references Jira Issue OCPBUGS-60045, which is invalid:
Comment 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. |
76b06d3
to
063643d
Compare
96d7964
to
efb659f
Compare
When different controllers update the same CA bundle a conflict may occur. In that case we return an empty set of certificates and empty error. The sync procedure should exit if either non-empty error received or cabundle is empty, as this ca bundle is later used to detemine whether target cert can be verified. If conflict occurred during CA bundle update we should restart the sync worker again - otherwise this may lead to target certificate unexpectedly regenerated. When service network target certificate is being updated it may be fatal, as the operator will lose its connection to API server and won't be able to receive an updated certificate. Co-Authored-By: Masaki Hatada <mas-hatada@nec.com>
efb659f
to
85a6e3e
Compare
/jira refresh |
@vrutkovs: This pull request references Jira Issue OCPBUGS-60045, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
This change looks solid. It addresses a potential race condition where an empty CA bundle could cause unexpected certificate regeneration. By explicitly checking for nil signingCertKeyPair and The addition of client_cert_rotation_controller_test.go is excellent. It includes thorough test cases that cover the new error conditions, ensuring the fix is robust and well-tested. Gemini advice: This is a good change. I'd recommend merging it. The logic is sound, and the tests are comprehensive. I also agree. |
/assign @jsafrane |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, vrutkovs, wangke19 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 |
@vrutkovs: all tests passed! 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. |
@vrutkovs: Jira Issue OCPBUGS-60045: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-60045 has been moved to the MODIFIED state. 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. |
/cherrypick release-4.20 |
@vrutkovs: new pull request created: #2022 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 kubernetes-sigs/prow repository. |
When different controllers update the same CA bundle a conflict may occur. In that case we return an empty set of certificates and empty error.
The sync procedure should exit if either non-empty error received or cabundle is empty, as this ca bundle is later used to detemine whether target cert can be verified. If conflict occurred during CA bundle update we should restart the sync worker again - otherwise this may lead to target certificate unexpectedly regenerated. When service network target certificate is being updated it may be fatal, as the operator will lose its connection to API server and won't be able to receive an updated certificate.