Skip to content

Commit

Permalink
Fixes to migrator that will remove unimportant differences
Browse files Browse the repository at this point in the history
  • Loading branch information
akgalwas committed Sep 11, 2024
1 parent 80c41a8 commit 815595a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/runtime-migrator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func createRuntime(ctx context.Context, shoot v1beta1.Shoot, cfg migrator.Config
},
Provider: v1.Provider{
Type: shoot.Spec.Provider.Type,
Workers: getWorkersConfig(shoot.Spec.Provider.Workers),
Workers: adjustWorkersConfig(shoot.Spec.Provider.Workers),
},
Networking: v1.Networking{
Type: shoot.Spec.Networking.Type,
Expand Down Expand Up @@ -245,7 +245,7 @@ func createRuntime(ctx context.Context, shoot v1beta1.Shoot, cfg migrator.Config

// The goal of this function is to make the migrator output equal to the shoot created by the converter
// As a result we can automatically verify the correctness of the migrator output
func getWorkersConfig(workers []v1beta1.Worker) []v1beta1.Worker {
func adjustWorkersConfig(workers []v1beta1.Worker) []v1beta1.Worker {
// We need to set the following fields to nil, as they are not set by the KIM converter
for i := 0; i < len(workers); i++ {
workers[i].Machine.Architecture = nil
Expand Down

0 comments on commit 815595a

Please sign in to comment.