Fix restoration of infra with migrated network layout #907
+188
−41
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.
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: