Expose flatcar-install OEM parameter

By exposing this parameter it is possible to install OEM specific software
during the `flatcar-install` invocation.
This commit is contained in:
Lucas Resch 2023-03-02 09:14:03 +01:00 committed by Dalton Hubble
parent 5f303212d2
commit 6bd2a1a528
9 changed files with 24 additions and 1 deletions

View File

@ -18,6 +18,7 @@ Notable changes between versions.
### Bare-Metal
* Add a `worker` module to allow customizing individual worker nodes ([#1295](https://github.com/poseidon/typhoon/pull/1295))
* Expose `-o OEM` parameter of `flatcar-install` script ([#1302](https://github.com/poseidon/typhoon/pull/1302))
### Known Issues

View File

@ -35,6 +35,7 @@ storage:
-d ${install_disk} \
-C ${os_channel} \
-V ${os_version} \
-o ${oem_type} \
${baseurl_flag} \
-i ignition.json
udevadm settle

View File

@ -55,6 +55,7 @@ data "ct_config" "install" {
mac = concat(var.controllers.*.mac, var.workers.*.mac)[count.index]
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
oem_type = var.oem_type
# only cached profile adds -b baseurl
baseurl_flag = var.cached_install ? "-b ${var.matchbox_http_endpoint}/assets/flatcar" : ""
})

View File

@ -156,6 +156,17 @@ variable "enable_aggregation" {
default = true
}
variable "oem_type" {
type = string
description = <<EOD
An OEM type to install with flatcar-install. Find available types by looking for Flatcar image files
ending in `image.bin.bz2`. The OEM identifier is contained in the filename.
E.g., `flatcar_production_vmware_raw_image.bin.bz2` leads to `vmware_raw`.
See: https://www.flatcar.org/docs/latest/installing/bare-metal/installing-to-disk/#choose-a-channel
EOD
default = ""
}
# unofficial, undocumented, unsupported
variable "cluster_domain_suffix" {

View File

@ -35,6 +35,7 @@ storage:
-d ${install_disk} \
-C ${os_channel} \
-V ${os_version} \
-o ${oem_type} \
${baseurl_flag} \
-i ignition.json
udevadm settle

View File

@ -50,6 +50,7 @@ data "ct_config" "install" {
mac = var.mac
install_disk = var.install_disk
ssh_authorized_key = var.ssh_authorized_key
oem_type = var.oem_type
# only cached profile adds -b baseurl
baseurl_flag = var.cached_install ? "-b ${var.matchbox_http_endpoint}/assets/flatcar" : ""
})

View File

@ -98,6 +98,12 @@ variable "kernel_args" {
default = []
}
variable "oem_type" {
type = string
default = ""
description = "An OEM type to install with flatcar-install."
}
# unofficial, undocumented, unsupported
variable "service_cidr" {

View File

@ -28,5 +28,6 @@ module "workers" {
cached_install = var.cached_install
install_disk = var.install_disk
kernel_args = var.kernel_args
oem_type = var.oem_type
}

View File

@ -383,4 +383,4 @@ Check the [variables.tf](https://github.com/poseidon/typhoon/blob/master/bare-me
| kernel_args | Additional kernel args to provide at PXE boot | [] | ["kvm-intel.nested=1"] |
| worker_node_labels | Map from worker name to list of initial node labels | {} | {"node2" = ["role=special"]} |
| worker_node_taints | Map from worker name to list of initial node taints | {} | {"node2" = ["role=special:NoSchedule"]} |
| oem_type | An OEM type to install with `flatcar-install`. | "" | "vmware_raw" |