[release-5.0] OCPBUGS-111097: Drop strategy.rollingUpdate and switch strategy.type to Recreate via pre-patch in frr-k8s-statuscleaner deployments on SNO - #3129
Conversation
On upgrade, the frr-k8s-statuscleaner Deployment has rollingUpdate
fields defaulted by the API server. SSA cannot remove fields it does
not own, so switching strategy.type to Recreate fails with:
spec.strategy.rollingUpdate: Forbidden: may not be specified when
strategy `type` is 'Recreate'
Add a generic pre-patch annotation:
networkoperator.openshift.io/pre-patch
that applies a strategic-merge-patch to the live object before SSA. This
lets the template atomically set type=Recreate and remove rollingUpdate
in a single patch, before SSA takes over.
Also explicitly set strategy to RollingUpdate with rollingUpdate fields
on non-SNO clusters so that CNO owns these fields going forward,
preventing the issue from recurring in case we have to make the same
switch for non-SNO clusters in the future.
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add tests for ApplyObject's pre-patch behavior: strategic-merge-patch runs before SSA, NotFound is tolerated, other errors stop reconciliation, and objects without the annotation skip pre-patch entirely. Remove fakeRESTMapper and replace it with testrestmapper.TetsOnlyStaticRESTMapper to return a proper mapper, and return scheme.Scheme from Scheme(). Both changes needed by ApplyObject under test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Andreas Karis <ak.karis@gmail.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@openshift-cherrypick-robot: Detected clone of Jira Issue OCPBUGS-64582 with correct target version. Will retitle the PR to link to the clone. 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. |
|
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 YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-111097, 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 |
|
@andreaskaris: This pull request references Jira Issue OCPBUGS-111097, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (jechen@redhat.com), skipping review request. 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. |
|
@cgoncalves can you PTAL and if ok lgtm? (clean cherry-pick) |
|
/lgtm |
|
Scheduling required tests: Scheduling tests matching the |
|
/verified by pre-merge testing by @jechen0648 |
|
@jechen0648: 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. |
|
/retest-failed |
|
/retest |
|
/approved |
|
/label backport-risk-assessed |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgoncalves, jcaamano, openshift-cherrypick-robot 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 |
7c93f33
into
openshift:release-5.0
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-111097: All pull requests linked via external trackers have merged:
Jira Issue OCPBUGS-111097 has been moved to the MODIFIED state. 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. |
|
@openshift-cherrypick-robot: The following tests 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. |
|
Fix included in release 5.0.0-0.nightly-2026-08-21-184859 |
This is an automated cherry-pick of #3121
/assign andreaskaris