Skip to content
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
2 changes: 1 addition & 1 deletion machines/aws/worker.machineset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- name: "owner-id"
values:
- "595879546273"
instanceType: m4.large
instanceType: {{.AWS.InstanceType}}
placement:
region: {{.AWS.Region}}
availabilityZone: {{.AWS.AvailabilityZone}}
Expand Down
1 change: 1 addition & 0 deletions pkg/render/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type AWSConfig struct {
ContainerLinuxVersion string `json:"containerLinuxVersion"`
Replicas string `json:"replicas"`
WithCreds bool `json:"withCreds"`
InstanceType string `json:"instanceType"`
}

// Images allows build systems to inject images for MAO components.
Expand Down
21 changes: 11 additions & 10 deletions pkg/render/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ func TestClusterAWSManifest(t *testing.T) {
TargetNamespace: "go-test",
Provider: "AWS",
AWS: &AWSConfig{
ClusterName: "TestClusterManifest-ClusterName",
ClusterID: "TestClusterManifest-ClusterID",
Region: "TestClusterManifest-Region",
AvailabilityZone: "TestClusterManifest-AvailabilityZone",
ClusterID: "TestClusterManifest-ClusterID",
ClusterName: "TestClusterManifest-ClusterName",
Image: "TestClusterManifest-Image",
Region: "TestClusterManifest-Region",
Replicas: "TestClusterManifest-Replicas",
},
}
Expand Down Expand Up @@ -71,14 +71,15 @@ func TestMachineSetAWSManifest(t *testing.T) {
TargetNamespace: "go-test",
Provider: "aws",
AWS: &AWSConfig{
ClusterName: "TestClusterManifest-ClusterName",
AvailabilityZone: "TestClusterManifest-AvailabilityZone",
ClusterID: "TestClusterManifest-ClusterID",
ReleaseChannel: "TestChannel",
ClusterName: "TestClusterManifest-ClusterName",
ContainerLinuxVersion: "TestCLVersion",
Region: "TestClusterManifest-Region",
AvailabilityZone: "TestClusterManifest-AvailabilityZone",
Image: "TestClusterManifest-Image",
Replicas: "TestClusterManifest-Replicas",
Image: "TestClusterManifest-Image",
InstanceType: "TestClusterManifest-InstanceType",
Region: "TestClusterManifest-Region",
ReleaseChannel: "TestChannel",
Replicas: "TestClusterManifest-Replicas",
},
}

Expand Down Expand Up @@ -126,7 +127,7 @@ spec:
- name: "owner-id"
values:
- "595879546273"
instanceType: m4.large
instanceType: TestClusterManifest-InstanceType
placement:
region: TestClusterManifest-Region
availabilityZone: TestClusterManifest-AvailabilityZone
Expand Down
8 changes: 5 additions & 3 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const (
targetNamespace = "openshift-cluster-api"
awsCredentialsSecretName = "aws-credentials-secret"
region = "us-east-1"
instanceType = "m4.large"
machineSetReplicas = 2
)

Expand Down Expand Up @@ -258,9 +259,10 @@ var rootCmd = &cobra.Command{
}
configValues := &render.OperatorConfig{
AWS: &render.AWSConfig{
ClusterID: clusterID,
ClusterName: clusterID,
Region: region,
ClusterID: clusterID,
ClusterName: clusterID,
Region: region,
InstanceType: instanceType,
},
}
maoConfigPopulatedData, err := render.Manifests(configValues, maoConfigTemplateData)
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/manifests/mao-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ aws:
containerLinuxVersion: 1800.7.0
image: ""
region: {{.AWS.Region}}
instanceType: {{.AWS.InstanceType}}
releaseChannel: stable
replicas: 2
WithCreds: true
Expand Down