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

Migrator: added fetching shoot to minimise runtime recreation risk #522

Merged

Conversation

akgalwas
Copy link
Contributor

@akgalwas akgalwas commented Nov 22, 2024

Description
During the migration process users may delete runtimes. There is the following scenario:

  1. I get the list of runtimes to be migrated from the KCP tool.
  2. I start the migration process. Migrator in the fist step fetches all the shoots
  3. The user triggers deletion of a specific runtime R1
  4. Migrator creates Runtime CR for runtime R1 and applies it on the KCP
  5. The shoot corresponding to runtime R1 gets deleted
  6. I proceed with the rollout steps, and edit Runtime CR R1 to be controlled by the KIM.
  7. The shoot gets recreated.

It is depicted on the following diagram:
image

There are two possible solutions to this problem:

  • Using shoot, and runtimeID pair as input
  • Fetching shoot from the Gardener prior to calling conversion to Runtime CR

The second option is easier to implement, and requires less changes in documentation. In addition we should check if the deletion is in progress.

Changes proposed in this pull request:

  • Migrator fetches shoot to minimise the threat of recreating Runtimes that were already deleted
  • Matcher fix to not detect unimportant difference
  • Shoot comparator uses newest image
  • Code fetching GardenerCluster CR simplified
  • Error messages fixes

@akgalwas akgalwas requested a review from a team as a code owner November 22, 2024 15:25
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 22, 2024
@akgalwas akgalwas requested a review from a team as a code owner November 22, 2024 16:19
@akgalwas akgalwas changed the title Fix in the comparison, and added fetching shoot to minimize runtime r… Migrator: added fetching shoot to minimise runtime recreation risk Nov 22, 2024
@kyma-bot kyma-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 23, 2024
@m00g3n m00g3n added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 26, 2024
m00g3n
m00g3n previously approved these changes Nov 26, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Nov 26, 2024
@kyma-bot kyma-bot removed the lgtm Looks good to me! label Nov 26, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label Nov 26, 2024
Copy link
Contributor

@m00g3n m00g3n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akgalwas akgalwas enabled auto-merge (squash) November 26, 2024 16:04
@akgalwas akgalwas removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 26, 2024
@kyma-bot kyma-bot merged commit d75d9df into kyma-project:main Nov 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants