Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix restoration of infra with migrated network layout #907

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

plkokanov
Copy link
Contributor

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 the Infrastructure resource so that the annotation is also added during the restore phase of control plane migration in the following cases:

  1. 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
  2. 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.

@plkokanov plkokanov requested review from a team as code owners June 27, 2024 08:13
@gardener-robot gardener-robot added needs/review Needs review area/control-plane-migration Control plane migration related kind/bug Bug platform/azure Microsoft Azure platform/infrastructure needs/rebase Needs git rebase labels Jun 27, 2024
@gardener-robot
Copy link

@plkokanov You need rebase this pull request with latest master branch. Please check.

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jun 27, 2024
@gardener-robot gardener-robot added the size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) label Jun 27, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jun 27, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jun 27, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jun 27, 2024
@plkokanov
Copy link
Contributor Author

/hold
I want to do a few more tests of the changes.

@gardener-robot gardener-robot added the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/control-plane-migration Control plane migration related kind/bug Bug needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/rebase Needs git rebase needs/review Needs review platform/azure Microsoft Azure platform/infrastructure reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies size/m Size of pull request is medium (see gardener-robot robot/bots/size.py)
Projects
None yet
4 participants