Open
Conversation
… 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.
… valid" This reverts commit 0d6371e.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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