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

KIM Integration - preview plan on Azure #999

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (s *CreateRuntimeResourceStep) providerValues(operation *internal.Operation
ProvisioningParameters: operation.ProvisioningParameters,
}
case broker.PreviewPlanID:
p = &provider.AWSInputProvider{
p = &provider.AzureInputProvider{
MultiZone: s.config.MultiZoneCluster,
ProvisioningParameters: operation.ProvisioningParameters,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation(t

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -459,10 +459,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation(t
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand All @@ -476,7 +476,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -505,10 +505,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

// then retry
_, repeat, err = step.Run(operation, entry)
Expand All @@ -525,10 +525,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 1, 0, 1, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand All @@ -542,7 +542,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_MultiZone_ActualCreation(t *

err := imv1.AddToScheme(scheme.Scheme)

instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "eu-west-2", "platform-region")
instance, operation := fixInstanceAndOperation(broker.PreviewPlanID, "westeurope", "platform-region")
assertInsertions(t, memoryStorage, instance, operation)

kimConfig := fixKimConfig("preview", false)
Expand Down Expand Up @@ -571,10 +571,10 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_MultiZone_ActualCreation(t *
assertLabelsKIMDriven(t, operation, runtime)
assertSecurity(t, runtime)

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "azure", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "westeurope", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 3, 0, 3, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "Standard_D2s_v5", 20, 3, 3, 0, 3, []string{"1", "2", "3"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
assert.NoError(t, err)
Expand Down
Loading