Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os_architecture option #1320

Closed
wants to merge 1 commit into from
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
1 change: 1 addition & 0 deletions bare-metal/flatcar-linux/kubernetes/butane/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ storage:
-d ${install_disk} \
-C ${os_channel} \
-V ${os_version} \
-B ${os_architecture}-usr \
${baseurl_flag} \
-i ignition.json
udevadm settle
Expand Down
9 changes: 5 additions & 4 deletions bare-metal/flatcar-linux/kubernetes/profiles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ locals {
# flatcar-stable -> stable channel
channel = split("-", var.os_channel)[1]

remote_kernel = "${var.download_protocol}://${local.channel}.release.flatcar-linux.net/amd64-usr/${var.os_version}/flatcar_production_pxe.vmlinuz"
remote_kernel = "${var.download_protocol}://${local.channel}.release.flatcar-linux.net/${var.os_architecture}-usr/${var.os_version}/flatcar_production_pxe.vmlinuz"
remote_initrd = [
"${var.download_protocol}://${local.channel}.release.flatcar-linux.net/amd64-usr/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
"${var.download_protocol}://${local.channel}.release.flatcar-linux.net/${var.os_architecture}-usr/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
]
args = [
"initrd=flatcar_production_pxe_image.cpio.gz",
"flatcar.config.url=${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"flatcar.first_boot=yes",
]

cached_kernel = "/assets/flatcar/${var.os_version}/flatcar_production_pxe.vmlinuz"
cached_kernel = "/assets/flatcar/${var.os_architecture}/${var.os_version}/flatcar_production_pxe.vmlinuz"
cached_initrd = [
"/assets/flatcar/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
"/assets/flatcar/${var.os_architecture}/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
]

kernel = var.cached_install ? local.cached_kernel : local.remote_kernel
Expand Down Expand Up @@ -51,6 +51,7 @@ data "ct_config" "install" {
content = templatefile("${path.module}/butane/install.yaml", {
os_channel = local.channel
os_version = var.os_version
os_architecture = var.os_architecture
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
mac = concat(var.controllers.*.mac, var.workers.*.mac)[count.index]
install_disk = var.install_disk
Expand Down
6 changes: 6 additions & 0 deletions bare-metal/flatcar-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ variable "enable_aggregation" {
default = true
}

variable "os_architecture" {
type = string
description = "CPU architecture of the node"
default = "amd64"
}

# unofficial, undocumented, unsupported

variable "cluster_domain_suffix" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ storage:
-d ${install_disk} \
-C ${os_channel} \
-V ${os_version} \
-B ${os_architecture}-usr \
${baseurl_flag} \
-i ignition.json
udevadm settle
Expand Down
5 changes: 3 additions & 2 deletions bare-metal/flatcar-linux/kubernetes/worker/matchbox.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ locals {
# flatcar-stable -> stable channel
channel = split("-", var.os_channel)[1]

remote_kernel = "${var.download_protocol}://${local.channel}.release.flatcar-linux.net/amd64-usr/${var.os_version}/flatcar_production_pxe.vmlinuz"
remote_kernel = "${var.download_protocol}://${local.channel}.release.flatcar-linux.net/${var.os_architecture}-usr/${var.os_version}/flatcar_production_pxe.vmlinuz"
remote_initrd = [
"${var.download_protocol}://${local.channel}.release.flatcar-linux.net/amd64-usr/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
"${var.download_protocol}://${local.channel}.release.flatcar-linux.net/${var.os_architecture}-usr/${var.os_version}/flatcar_production_pxe_image.cpio.gz",
]
args = flatten([
"initrd=flatcar_production_pxe_image.cpio.gz",
Expand Down Expand Up @@ -46,6 +46,7 @@ data "ct_config" "install" {
content = templatefile("${path.module}/butane/install.yaml", {
os_channel = local.channel
os_version = var.os_version
os_architecture = var.os_architecture
ignition_endpoint = format("%s/ignition", var.matchbox_http_endpoint)
mac = var.mac
install_disk = var.install_disk
Expand Down
6 changes: 6 additions & 0 deletions bare-metal/flatcar-linux/kubernetes/worker/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ variable "kernel_args" {
default = []
}

variable "os_architecture" {
type = string
description = "CPU architecture of the node"
default = "amd64"
}

# unofficial, undocumented, unsupported

variable "service_cidr" {
Expand Down
1 change: 1 addition & 0 deletions bare-metal/flatcar-linux/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ module "workers" {
cached_install = var.cached_install
install_disk = var.install_disk
kernel_args = var.kernel_args
os_architecture = var.os_architecture
}