feat: upgrade cluster-api to v1.9.11 with v1beta2 conditions#352
feat: upgrade cluster-api to v1.9.11 with v1beta2 conditions#352schegi wants to merge 31 commits into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ated FailureReason/FailureMessage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace v1beta1 conditions import with v1beta2 alias and update PatchObject to use SetSummaryCondition and WithOwnedV1Beta2Conditions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ions to v1beta2 Update IonosCloudClusterReconciler to use the new predicate signatures (scheme + logger) and replace conditions.MarkTrue with conditions.Set using metav1.Condition for compatibility with cluster-api v1beta2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…HasFailed guard Replace conditions import with v1beta2 alias, remove the dead HasFailed guard (method removed in Task 7), and replace MarkFalse calls with conditions.Set using metav1.Condition structs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Regenerate mocks after interface updates (import ordering change) - Fix ionoscloudmachine_types_test.go: remove FailureReason/FailureMessage references removed from IonosCloudMachineStatus in v1.9 upgrade - Update .golangci.yml: extend comment-spacings exclusion to allow //+listType and //+listMapKey controller-gen markers - Apply gofmt/gci formatting fixes (blank line removal in machine_test.go) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@copilot review this PR |
Agent-Logs-Url: https://github.com/ionos-cloud/cluster-api-provider-ionoscloud/sessions/c9e87a54-863c-4cbb-85c0-2ce2200af1a2 Co-authored-by: schegi <404395+schegi@users.noreply.github.com>
I reviewed the PR. The upgrade is correctly implemented — all CI checks pass (Lint, Test, Verify, Build, Container Image, Codespell, License), and all unit/integration tests pass. Changes reviewed:
One improvement applied (commit
Note on backward compatibility: The v1beta1 |
Add v1beta1 condition writes alongside every v1beta2 conditions.Set() call, matching the pattern used by CAPI's own controllers. The patch helper treats both condition systems independently with no auto-mirroring. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace string(clusterv1.ReadyCondition) with the dedicated clusterv1.ReadyV1Beta2Condition constant in SetSummaryCondition and WithOwnedV1Beta2Conditions for semantic clarity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
As all this v1beta1 vs v1beta2 is quite a hassle, I read through https://github.com/kubernetes-sigs/cluster-api/blob/4a2e16a3d71d99a923b1f7f3a3efe03c299665fb/docs/proposals/20240916-improve-status-in-CAPI-resources.md.
We have and want conditions, but good to point that out again.
That's soon.
So even the transition is optional. But we want the transition, of course.
A preview is nice. And CAPI shipped it long before that v1beta2 switch, so it made sense.
So going the same way as CAPI would not only require us to add that
The name of the conditions field doesn't change between v1beta1 and v1beta2, just the Given that
I propose we keep it simple and just change the conditions to v1beta2/metav1 directly, without any intermediate steps. That has also worked fine in one of our internal projects when updating the CAPI libs to v1.10. We bump our minor version, point it out in the release notes and that's it. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ter and machine types Remove backwards compatibility with the old v1beta1 condition system by replacing clusterv1.Conditions with []metav1.Condition directly in Status.Conditions, deleting the V1Beta2 nested structs, and removing the old GetConditions/SetConditions accessors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- go.opentelemetry.io/otel/sdk v1.41.0 -> v1.43.0 (CVE-2026-39883) - github.com/cloudflare/circl v1.6.1 -> v1.6.3 (CVE-2026-1229) - github.com/go-viper/mapstructure/v2 v2.2.1 -> v2.4.0 (CVE-2025-11065) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@copilot Review |
…ions table Agent-Logs-Url: https://github.com/ionos-cloud/cluster-api-provider-ionoscloud/sessions/02c70a61-6974-40fe-bb40-dc7330dd45b8 Co-authored-by: schegi <404395+schegi@users.noreply.github.com>
|
Done in commit
Review complete. The PR is in good shape. Here's a summary of the current state: Dependencies:
Conditions migration:
Cleanup:
Tests:
README:
One minor note: the |
|
For the record: We decided to shuffle the PRs a bit. The update to CAPI v1.9 will be extracted from the PR, so that we'll have only the switch of the conditions to metav1 plus the corresponding helpers from the v1beta2 packages in here. Merge and tag order will be the following then:
|



Summary
Test Plan
Merge
3 PRs in total (merge in that order, maybe release inbetween):