Skip to content

Commit 816b5a3

Browse files
authored
Added support for ubuntu minimal arm instances (#1047)
* added support for ubuntu minimal arm instances
1 parent 2698ec8 commit 816b5a3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

modules/workers/cloudinit.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ data "cloudinit_config" "workers" {
123123
for_each = !each.value.disable_default_cloud_init && lookup(local.ubuntu_worker_pools, each.key, null) != null ? [1] : []
124124
content {
125125
content_type = "text/x-shellscript"
126-
content = templatefile(
126+
content = templatefile(
127127
"${path.module}/cloudinit-ubuntu.sh.tftpl",
128128
{
129129
version_codename = lookup(local.ubuntu_supported_versions, lookup(lookup(local.ubuntu_worker_pools, each.key, {}), "ubuntu_release", lookup(each.value, "os_version")), "unsupported_ubuntu_version"),
130130
oke_major_version = lookup(lookup(local.ubuntu_worker_pools, each.key, {}), "kubernetes_major_version", "")
131131
oke_minor_version = lookup(lookup(local.ubuntu_worker_pools, each.key, {}), "kubernetes_minor_version", "")
132132
}
133133
)
134-
filename = "50-oke-ubuntu.sh"
135-
merge_type = local.default_cloud_init_merge_type
134+
filename = "50-oke-ubuntu.sh"
135+
merge_type = local.default_cloud_init_merge_type
136136
}
137137
}
138138

@@ -195,7 +195,7 @@ data "cloudinit_config" "workers" {
195195
precondition {
196196
condition = lookup(local.ubuntu_worker_pools, each.key, null) == null || (
197197
lookup(local.ubuntu_worker_pools, each.key, null) != null &&
198-
contains(keys(local.ubuntu_supported_versions), lookup(lookup(local.ubuntu_worker_pools, each.key, {}), "ubuntu_release", ""))
198+
contains(keys(local.ubuntu_supported_versions), lookup(lookup(local.ubuntu_worker_pools, each.key, {}), "ubuntu_release", ""))
199199
)
200200
error_message = <<-EOT
201201
Supported Ubuntu versions are "22.04" and "24.04".

modules/workers/locals.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,12 @@ locals {
295295
# Map of nodepools using Ubuntu images.
296296

297297
ubuntu_supported_versions = {
298-
"22.04" = "jammy"
299-
"24.04" = "noble"
300-
"22.04 Minimal" = "jammy"
301-
"24.04 Minimal" = "noble"
298+
"22.04" = "jammy"
299+
"24.04" = "noble"
300+
"22.04 Minimal" = "jammy"
301+
"22.04 Minimal aarch64" = "jammy"
302+
"24.04 Minimal" = "noble"
303+
"24.04 Minimal aarch64" = "noble"
302304
}
303305

304306
ubuntu_worker_pools = {

0 commit comments

Comments
 (0)