What this PR does / why we need it:
This PR modifies the layout mutator which adds the migration.azure.provider.extensions.gardener.cloud/zone annotation on the Infrastructure resource so that the annotation is also added during the restore phase of control plane migration in the following cases:
If the .status.state field is defined and is in the azure.provider.extensions.gardener.cloud/v1alpha1 group version, then
If its .data field contains an entry for migration.azure.provider.extensions.gardener.cloud/zone, then this entry is added as an annotation to the Infrastructure resource
If the .status.state field is defined and its type is InfrastructureState, then
If this .state field contains a .savedProviderStatus field and its .networks.subnets array contains a subnet for which the .migrated field is true and the .zone field is not nil
Additionally, during reconciliation, if the new flow reconciler is used and the migration.azure.provider.extensions.gardener.cloud/zone annotation is present on the Infrastructure resource, then it is persisted in the .status.state.data map.
Which issue(s) this PR fixes:
Fixes #827
Special notes for your reviewer:
Release note:
Fixed an issue that prevented the `Infrastructure` resource to be correctly restored during control plane migration, if the `Infrastructure` was previously migrated from a single subnet network layout to a multiple subnet network layout.
How to categorize this PR?
/area control-plane-migration /kind bug /platform azure
What this PR does / why we need it: This PR modifies the layout mutator which adds the
migration.azure.provider.extensions.gardener.cloud/zone
annotation on theInfrastructure
resource so that the annotation is also added during therestore
phase of control plane migration in the following cases:.status.state
field is defined and is in theazure.provider.extensions.gardener.cloud/v1alpha1
group version, then.data
field contains an entry formigration.azure.provider.extensions.gardener.cloud/zone
, then this entry is added as an annotation to theInfrastructure
resource.status.state
field is defined and its type isInfrastructureState
, then.state
field contains a.savedProviderStatus
field and its.networks.subnets
array contains a subnet for which the.migrated
field is true and the.zone
field is not nilAdditionally, during reconciliation, if the new flow reconciler is used and the
migration.azure.provider.extensions.gardener.cloud/zone
annotation is present on theInfrastructure
resource, then it is persisted in the.status.state.data
map.Which issue(s) this PR fixes: Fixes #827
Special notes for your reviewer:
Release note: