Skip to content

CAPI 1.11#299

Open
martiniadam wants to merge 24 commits intomasterfrom
adammartini/capi1-11
Open

CAPI 1.11#299
martiniadam wants to merge 24 commits intomasterfrom
adammartini/capi1-11

Conversation

@martiniadam
Copy link
Contributor

@martiniadam martiniadam commented Oct 8, 2025

This PR updates CAPH to use CAPI 1.11, and updates the provider to use v1beta2 CAPI API's

Please note that this will bring up CAPH to v1.2.0

… validation

The v1beta2 OSDisk.ManagedDisk field was a value type which caused it to serialize
as {"storageAccountType":""} when empty, failing validation with error:
  spec.template.spec.osDisk.managedDisk: Required value

Changed ManagedDisk from value type to pointer type with omitempty tag so empty
values are properly omitted from serialization. Added manual conversion functions
to handle the type difference between v1beta1 (value) and v1beta2 (pointer).
…tempty

This comprehensive fix addresses v1beta2 validation issues where empty nested structs
with required fields would fail CRD validation. By changing these from value types
to pointer types with omitempty, empty values are omitted from serialization entirely.

Changes:
- AzureStackHCIMachineSpec: Image, OSDisk, AvailabilityZone now pointers
- AzureStackHCIVirtualMachineSpec: Image, OSDisk, AvailabilityZone now pointers
- AzureStackHCILoadBalancerSpec: Image now pointer
- ManagedDisk in OSDisk: now pointer (previous fix)
- Added conversion functions for all affected types
- Updated controllers to handle pointer types correctly
During upgrade from CAPI 1.10 (v1beta1) to CAPI 1.11 (v1beta2), the
AzureStackHCICluster and AzureStackHCIMachine status conversion was not
populating the Initialization.Provisioned field from the v1beta1 Ready field.

This caused the v1beta2 machine controller to always return early with
'Cluster infrastructure is not ready yet' because it checks
Status.Initialization.Provisioned before reconciling machines.

Fix: Convert v1beta1 Ready=true to v1beta2 Initialization.Provisioned=true
for both cluster and machine status.
This preserves the timing behavior from CAPI v1beta1 where KCP waited for
InfrastructureReady (set late) rather than InfrastructureProvisioned (set
early in v1beta2).

Without this delay, KCP may adopt standalone control plane machines during
bootstrap and trigger an unwanted rolling update due to KubeadmConfig
mismatches between the standalone KubeadmConfig and KCP's kubeadmConfigSpec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant