OCPBUGS-90085: Fix NodePool reconciliation failure when updating mirrored immutable ConfigMaps#8813
Conversation
Mirrored ConfigMaps created by the NodePool NTO reconciler were set with immutable=true, which prevented Kubernetes from accepting in-place updates when the source ConfigMap data changed. This caused NodePools sharing the same kubelet ConfigMap to get stuck in UpdatingConfig=True with "field is immutable" errors. Remove the immutable flag from mutateMirroredConfig and add a migration helper that uses DeleteIfNeededWithPredicate to safely delete existing immutable mirrored ConfigMaps before CreateOrUpdate recreates them as mutable. The predicate guards deletion to only ConfigMaps with the nto-mirrored-config label belonging to the current NodePool. Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-85778, 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. |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ 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 |
|
/uncc @rtheis |
|
/retest |
|
@vsolanki12: all tests passed! 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. |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90085, 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 |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90085, which is invalid:
Comment 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 |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-90085, which is invalid:
Comment 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. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jparrill, vsolanki12 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 |
|
/lgtm |
Backport of #8543 to release-4.20.
Adapted cherry-pick to use
supportutil.DeleteIfNeededWithPredicateandsupportutil.ShortenNameinstead ofk8sutil/netutilwhich don't exist on the release branch (they were extracted fromsupport/utilin a later refactor on main).