diff --git a/machines/aws/machine-set.yaml b/machines/aws/machine-set.yaml index 8d7d3d97defa3a00d8618243e721048c49aafe7c..d4e7fd94fae5ad6a53025d2c0706a105b74e4b53 100644 --- a/machines/aws/machine-set.yaml +++ b/machines/aws/machine-set.yaml @@ -28,6 +28,19 @@ spec: kind: AWSMachineProviderConfig ami: id: {{.AWS.Image}} + filters: + - name: "name" + values: + - CoreOS-{{.AWS.ReleaseChannel}}-{{.AWS.ContainerLinuxVersion}}-* + - name: "architecture" + values: + - "x86_64" + - name: "virtualization-type" + values: + - "hvm" + - name: "owner-id" + values: + - "595879546273" instanceType: m4.large placement: region: {{.AWS.Region}} @@ -36,7 +49,7 @@ spec: filters: - name: "tag:Name" values: - - {{.AWS.ClusterName}}-worker-{{.AWS.AvailabilityZone}} + - {{.AWS.ClusterName}}-worker-* publicIp: true iamInstanceProfile: id: {{.AWS.ClusterName}}-master-profile diff --git a/pkg/render/config.go b/pkg/render/config.go index de79268e293e9104c362d1c84ae5bb4fa7601639..08831d2c7fe0d38a6604801f785c88f4ee6ad277 100644 --- a/pkg/render/config.go +++ b/pkg/render/config.go @@ -26,10 +26,12 @@ type libvirtConfig struct { } type awsConfig struct { - ClusterName string `json:"clusterName"` - ClusterID string `json:"clusterID"` - Region string `json:"region"` - AvailabilityZone string `json:"availabilityZone"` - Image string `json:"image"` - Replicas string `json:"replicas"` + ClusterName string `json:"clusterName"` + ClusterID string `json:"clusterID"` + Region string `json:"region"` + AvailabilityZone string `json:"availabilityZone"` + Image string `json:"image"` + ReleaseChannel string `json:"releaseChannel"` + ContainerLinuxVersion string `json:"containerLinuxVersion"` + Replicas string `json:"replicas"` } diff --git a/pkg/render/render_test.go b/pkg/render/render_test.go index 24d44c918929bd01c12b00c5dc4c3a1534b5a32a..436f131790a05b4c8b601533fc8cbf9065cfea58 100644 --- a/pkg/render/render_test.go +++ b/pkg/render/render_test.go @@ -69,12 +69,14 @@ func TestMachineSetAWSManifest(t *testing.T) { config := OperatorConfig{ Provider: "aws", AWS: &awsConfig{ - ClusterName: "TestClusterManifest-ClusterName", - ClusterID: "TestClusterManifest-ClusterID", - Region: "TestClusterManifest-Region", - AvailabilityZone: "TestClusterManifest-AvailabilityZone", - Image: "TestClusterManifest-Image", - Replicas: "TestClusterManifest-Replicas", + ClusterName: "TestClusterManifest-ClusterName", + ClusterID: "TestClusterManifest-ClusterID", + ReleaseChannel: "TestChannel", + ContainerLinuxVersion: "TestCLVersion", + Region: "TestClusterManifest-Region", + AvailabilityZone: "TestClusterManifest-AvailabilityZone", + Image: "TestClusterManifest-Image", + Replicas: "TestClusterManifest-Replicas", }, } @@ -109,6 +111,19 @@ spec: kind: AWSMachineProviderConfig ami: id: TestClusterManifest-Image + filters: + - name: "name" + values: + - CoreOS-TestChannel-TestCLVersion-* + - name: "architecture" + values: + - "x86_64" + - name: "virtualization-type" + values: + - "hvm" + - name: "owner-id" + values: + - "595879546273" instanceType: m4.large placement: region: TestClusterManifest-Region @@ -117,7 +132,7 @@ spec: filters: - name: "tag:Name" values: - - TestClusterManifest-ClusterName-worker-TestClusterManifest-AvailabilityZone + - TestClusterManifest-ClusterName-worker-* publicIp: true iamInstanceProfile: id: TestClusterManifest-ClusterName-master-profile