Skip to content

Commit 9d60205

Browse files
authored
Merge pull request #244 from openinfradev/capa_fix_ami
cluster-api-aws: fix AMI specification errors
2 parents 73daf9f + 1b5ffc0 commit 9d60205

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

cluster-api-aws/templates/kubeadm-control-plane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
rootVolume:
5656
size: {{ .Values.kubeadmControlPlane.rootVolume.size }}
5757
type: {{ .Values.kubeadmControlPlane.rootVolume.type }}
58-
{{- if .Values.kubeadmControlPlane.ami }}
58+
{{- with .Values.kubeadmControlPlane.ami }}
5959
ami:
6060
{{- toYaml . | nindent 8 }}
6161
{{- end }}

cluster-api-aws/templates/machine-deployment.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ spec:
8383
additionalSecurityGroups:
8484
{{- toYaml . | nindent 10 }}
8585
{{- end }}
86+
{{- with .ami }}
87+
ami:
88+
{{- toYaml . | nindent 10 }}
89+
{{- end }}
90+
8691

8792
---
8893
{{- if $envAll.Values.cluster.eksEnabled }}

cluster-api-aws/templates/machine-pool.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ spec:
7474
rootVolume:
7575
size: {{ .rootVolume.size }}
7676
type: {{ .rootVolume.type }}
77-
{{- if .ami }}
77+
{{- with .ami }}
7878
ami:
7979
{{- toYaml . | nindent 8 }}
8080
{{- end }}

cluster-api-aws/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ kubeadmControlPlane:
6161
size: 8
6262
type: gp3
6363
# ami:
64-
# id: ami-xxxxxxxxxxxxxxxxx
64+
# id: ami-02e4e8f09921cfe97
6565
# additionalSecurityGroups: []
6666
useSpotInstance: #spotMarketOptions:
6767
enabled: false
@@ -93,6 +93,7 @@ machinePool: []
9393
# roleAdditionalPolicies:
9494
# - "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
9595
# additionalSecurityGroups: []
96+
# ami: ami-02e4e8f09921cfe97
9697
# **this version dosen't support the spot instance, because the aws cluster api provider doesn't support it in awsmachinpool**
9798
# useSpotInstance: #spotMarketOptions:
9899
# enabled: false
@@ -108,6 +109,7 @@ machinePool: []
108109
# subnets: []
109110
# labels: []
110111
# additionalSecurityGroups: []
112+
# ami: ami-02e4e8f09921cfe97
111113

112114
machineDeployment: []
113115
# You can define machineDeployment to use cluster-autoscaler on aws. Refer to below.
@@ -126,6 +128,7 @@ machineDeployment: []
126128
# maxPrice: ''
127129
# # MaxPrice defines the maximum price the user is willing to pay for Spot VM instances
128130
# additionalSecurityGroups: []
131+
# ami: ami-02e4e8f09921cfe97
129132

130133
machineKubeadmConfig:
131134
kubeletExtraArgs: {}

0 commit comments

Comments
 (0)