Revert Flatcar Linux Azure to manual upload images

* Initial support for Flatcar Linux on Azure used the Flatcar
Linux Azure Marketplace images (e.g. `flatcar-stable`) in
https://github.com/poseidon/typhoon/pull/664
* Flatcar Linux Azure Marketplace images have some unresolved
items https://github.com/poseidon/typhoon/issues/703
* Until the Marketplace items are resolved, revert to requiring
Flatcar Linux's images be manually uploaded (like GCP and
DigitalOcean)
This commit is contained in:
Dalton Hubble
2020-04-18 15:30:28 -07:00
parent bf22222f7d
commit 2b1b918b43
6 changed files with 61 additions and 36 deletions

View File

@ -53,23 +53,18 @@ resource "azurerm_linux_virtual_machine" "controllers" {
storage_account_type = "Premium_LRS"
}
source_image_reference {
publisher = local.flavor == "flatcar" ? "Kinvolk" : "CoreOS"
offer = local.flavor == "flatcar" ? "flatcar-container-linux" : "CoreOS"
sku = local.channel
version = "latest"
}
# Gross hack just for Flatcar Linux
dynamic "plan" {
for_each = local.flavor == "flatcar" ? [1] : []
// CoreOS Container Linux or Flatcar Container Linux (manual upload)
dynamic "source_image_reference" {
for_each = local.flavor == "coreos" ? [1] : []
content {
name = local.channel
publisher = "kinvolk"
product = "flatcar-container-linux"
publisher = "CoreOS"
offer = "CoreOS"
sku = local.channel
version = "latest"
}
}
source_image_id = local.flavor == "coreos" ? null : var.os_image
# network
network_interface_ids = [

View File

@ -48,8 +48,7 @@ variable "worker_type" {
variable "os_image" {
type = string
description = "Channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta)"
default = "flatcar-stable"
description = "Channel for a Container Linux derivative (/subscriptions/some-flatcar-upload, coreos-stable, coreos-beta, coreos-alpha)"
}
variable "disk_size" {

View File

@ -24,23 +24,18 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
caching = "ReadWrite"
}
source_image_reference {
publisher = local.flavor == "flatcar" ? "Kinvolk" : "CoreOS"
offer = local.flavor == "flatcar" ? "flatcar-container-linux" : "CoreOS"
sku = local.channel
version = "latest"
}
# Gross hack just for Flatcar Linux
dynamic "plan" {
for_each = local.flavor == "flatcar" ? [1] : []
// CoreOS Container Linux or Flatcar Container Linux (manual upload)
dynamic "source_image_reference" {
for_each = local.flavor == "coreos" ? [1] : []
content {
name = local.channel
publisher = "kinvolk"
product = "flatcar-container-linux"
publisher = "CoreOS"
offer = "CoreOS"
sku = local.channel
version = "latest"
}
}
source_image_id = local.flavor == "coreos" ? null : var.os_image
# Azure requires setting admin_ssh_key, though Ignition custom_data handles it too
admin_username = "core"