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 - set Purpose as development for all plans #1220

Closed
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 @@ -250,7 +250,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_SingleZone_EnforceSeed_ActualCre
assert.True(t, *runtime.Spec.Shoot.EnforceSeedLocation)
assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, SecretBindingName, runtime.Spec.Shoot.SecretBindingName)
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assert.Equal(t, "zone", string(runtime.Spec.Shoot.ControlPlane.HighAvailability.FailureTolerance.Type))
Expand Down Expand Up @@ -300,7 +300,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_SingleZone_DisableEnterpriseFilt

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, SecretBindingName, runtime.Spec.Shoot.SecretBindingName)
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assert.Equal(t, "zone", string(runtime.Spec.Shoot.ControlPlane.HighAvailability.FailureTolerance.Type))
Expand Down Expand Up @@ -349,7 +349,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_SingleZone_DefaultAdmin_ActualCr

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, SecretBindingName, runtime.Spec.Shoot.SecretBindingName)
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assert.Equal(t, "zone", string(runtime.Spec.Shoot.ControlPlane.HighAvailability.FailureTolerance.Type))
Expand Down Expand Up @@ -398,7 +398,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_SingleZone_DryRun_ActualCreation

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, SecretBindingName, runtime.Spec.Shoot.SecretBindingName)
assertWorkers(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 1, 0, 1, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"})
assert.Equal(t, "zone", string(runtime.Spec.Shoot.ControlPlane.HighAvailability.FailureTolerance.Type))
Expand Down Expand Up @@ -452,7 +452,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_MultiZoneWithNetworking_ActualCr

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", string(runtime.Spec.Shoot.Purpose))
assertWorkersWithVolume(t, runtime.Spec.Shoot.Provider.Workers, "m6i.large", 20, 3, 3, 0, 3, []string{"eu-west-2a", "eu-west-2b", "eu-west-2c"}, "80Gi", "gp3")
assertNetworking(t, imv1.Networking{
Nodes: "192.168.48.0/20",
Expand Down Expand Up @@ -504,7 +504,7 @@ func TestCreateRuntimeResourceStep_Defaults_AWS_MultiZone_ActualCreation(t *test

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", 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"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
Expand Down Expand Up @@ -549,7 +549,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation(t

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", 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"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
Expand Down Expand Up @@ -595,7 +595,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", 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"})

// then retry
Expand All @@ -615,7 +615,7 @@ func TestCreateRuntimeResourceStep_Defaults_Preview_SingleZone_ActualCreation_Wi

assert.Equal(t, "aws", runtime.Spec.Shoot.Provider.Type)
assert.Equal(t, "eu-west-2", runtime.Spec.Shoot.Region)
assert.Equal(t, "production", string(runtime.Spec.Shoot.Purpose))
assert.Equal(t, "development", 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"})

_, err = memoryStorage.Instances().GetByID(operation.InstanceID)
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (p *AWSInputProvider) Provide() Values {
ProviderType: "aws",
DefaultMachineType: DefaultAWSMachineType,
Region: region,
Purpose: PurposeProduction,
Purpose: PurposeDevelopment,
VolumeSizeGb: 80,
DiskType: "gp3",
}
Expand Down Expand Up @@ -73,7 +73,7 @@ func (p *AWSTrialInputProvider) Provide() Values {
ProviderType: "aws",
DefaultMachineType: machineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
VolumeSizeGb: 50,
DiskType: "gp3",
}
Expand Down Expand Up @@ -110,7 +110,7 @@ func (p *AWSFreemiumInputProvider) Provide() Values {
ProviderType: "aws",
DefaultMachineType: machineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
VolumeSizeGb: 50,
DiskType: "gp3",
}
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/aws_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestAWSDefaults(t *testing.T) {
ProviderType: "aws",
DefaultMachineType: "m6i.large",
Region: "eu-central-1",
Purpose: "production",
Purpose: "development",
VolumeSizeGb: 80,
DiskType: "gp3",
}, values)
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestAWSSpecific(t *testing.T) {
ProviderType: "aws",
DefaultMachineType: "m6i.large",
Region: "ap-southeast-1",
Purpose: "production",
Purpose: "development",
VolumeSizeGb: 80,
DiskType: "gp3",
}, values)
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestAWSTrialDefaults(t *testing.T) {
ProviderType: "aws",
DefaultMachineType: "m5.xlarge",
Region: "eu-central-1",
Purpose: "evaluation",
Purpose: "development",
VolumeSizeGb: 50,
DiskType: "gp3",
}, values)
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestAWSTrialSpecific(t *testing.T) {
ProviderType: "aws",
DefaultMachineType: "m5.xlarge",
Region: "ap-southeast-1",
Purpose: "evaluation",
Purpose: "development",
VolumeSizeGb: 50,
DiskType: "gp3",
}, values)
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (p *AzureInputProvider) Provide() Values {
ProviderType: "azure",
DefaultMachineType: DefaultAzureMachineType,
Region: region,
Purpose: PurposeProduction,
Purpose: PurposeDevelopment,
DiskType: "StandardSSD_LRS",
VolumeSizeGb: 80,
}
Expand Down Expand Up @@ -79,7 +79,7 @@ func (p *AzureTrialInputProvider) Provide() Values {
ProviderType: "azure",
DefaultMachineType: machineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func (p *AzureLiteInputProvider) Provide() Values {
ProviderType: "azure",
DefaultMachineType: machineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}
Expand Down Expand Up @@ -158,7 +158,7 @@ func (p *AzureFreemiumInputProvider) Provide() Values {
ProviderType: "azure",
DefaultMachineType: machineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}
Expand Down
12 changes: 6 additions & 6 deletions internal/provider/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestAzureDefaults(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D2s_v5",
Region: "eastus",
Purpose: "production",
Purpose: "development",
DiskType: "StandardSSD_LRS",
VolumeSizeGb: 80,
}, values)
Expand Down Expand Up @@ -63,7 +63,7 @@ func TestAzureTrialDefaults(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D4s_v5",
Region: "switzerlandnorth",
Purpose: "evaluation",
Purpose: "development",
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}, values)
Expand Down Expand Up @@ -92,7 +92,7 @@ func TestAzureLiteDefaults(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D4s_v5",
Region: "eastus",
Purpose: "evaluation",
Purpose: "development",
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}, values)
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestAzureSpecific(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D2s_v5",
Region: "uksouth",
Purpose: "production",
Purpose: "development",
DiskType: "StandardSSD_LRS",
VolumeSizeGb: 80,
}, values)
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestAzureTrialSpecific(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D4s_v5",
Region: "southeastasia",
Purpose: "evaluation",
Purpose: "development",
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}, values)
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestAzureLiteSpecific(t *testing.T) {
ProviderType: "azure",
DefaultMachineType: "Standard_D4s_v5",
Region: "uksouth",
Purpose: "evaluation",
Purpose: "development",
DiskType: "Standard_LRS",
VolumeSizeGb: 50,
}, values)
Expand Down
5 changes: 3 additions & 2 deletions internal/provider/common.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package provider

const (
PurposeEvaluation = "evaluation"
PurposeProduction = "production"
PurposeEvaluation = "evaluation"
PurposeProduction = "production"
PurposeDevelopment = "development"
)

func updateString(toUpdate *string, value *string) {
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (p *GCPInputProvider) Provide() Values {
ProviderType: "gcp",
DefaultMachineType: DefaultGCPMachineType,
Region: region,
Purpose: PurposeProduction,
Purpose: PurposeDevelopment,
VolumeSizeGb: 80,
DiskType: "pd-balanced",
}
Expand Down Expand Up @@ -65,7 +65,7 @@ func (p *GCPTrialInputProvider) Provide() Values {
ProviderType: "gcp",
DefaultMachineType: DefaultGCPTrialMachineType,
Region: region,
Purpose: PurposeEvaluation,
Purpose: PurposeDevelopment,
VolumeSizeGb: 30,
DiskType: "pd-standard",
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/sap-converged-cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (p *SapConvergedCloudInputProvider) Provide() Values {
ProviderType: "openstack",
DefaultMachineType: DefaultSapConvergedCloudMachineType,
Region: region,
Purpose: PurposeProduction,
Purpose: PurposeDevelopment,
DiskType: "",
}
}
Expand Down
Loading