Skip to content

Commit f1a0d4d

Browse files
authored
Merge pull request #9766 from zalando-incubator/etcd-arm-configs
make etcd image resolution automatic
2 parents b72ba13 + 08eb2fa commit f1a0d4d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

cluster/config-defaults.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,8 @@ etcd_instance_type: "t3.medium"
765765

766766
etcd_scalyr_key: ""
767767

768-
etcd_ami: {{ amiID "zalando-ubuntu-etcd-production-v3.5.18-amd64-main-35" "861068367966"}}
768+
etcd_ami_amd64: {{ amiID "zalando-ubuntu-etcd-production-v3.5.22-amd64-main-38" "861068367966"}}
769+
etcd_ami_arm64: {{ amiID "zalando-ubuntu-etcd-production-v3.5.22-arm64-main-38" "861068367966"}}
769770

770771
cluster_dns: "coredns"
771772
coredns_log_svc_names: "true"

cluster/etcd/stack.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Metadata:
66
"kubernetes:component": "etcd-cluster"
77
application: "kubernetes"
88
component: "etcd-cluster"
9+
Mappings:
10+
Images:
11+
{{.Cluster.Region}}:
12+
# Use the etcd instance architecture to construct the config item name that we're using to get the AMI name.
13+
MachineImage: '{{ index .Cluster.ConfigItems (print "etcd_ami_" .Values.etcd_instance_type_info.Architecture) }}'
914
Outputs:
1015
EtcdClusterSecurityGroupId:
1116
Description: "Security Group ID of the etcd cluster"
@@ -53,7 +58,10 @@ Resources:
5358
IamInstanceProfile:
5459
Name: !Ref AppServerInstanceProfile
5560
InstanceInitiatedShutdownBehavior: terminate
56-
ImageId: {{.Cluster.ConfigItems.etcd_ami}}
61+
ImageId: !FindInMap
62+
- Images
63+
- !Ref 'AWS::Region'
64+
- MachineImage
5765
InstanceType: {{.Cluster.ConfigItems.etcd_instance_type}}
5866
UserData:
5967
Fn::Base64: !Sub |

0 commit comments

Comments
 (0)