Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Revert Flatcar Linux Azure to manual upload images
Browse files Browse the repository at this point in the history
* Initial support for Flatcar Linux on Azure used the Flatcar
Linux Azure Marketplace images (e.g. `flatcar-stable`) in
poseidon/typhoon#664
* Flatcar Linux Azure Marketplace images have some unresolved
items poseidon/typhoon#703
* Until the Marketplace items are resolved, revert to requiring
Flatcar Linux's images be manually uploaded (like GCP and
DigitalOcean)
  • Loading branch information
dghubble committed Apr 18, 2020
1 parent fbc13d4 commit 2e9f88c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
21 changes: 8 additions & 13 deletions controllers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
3 changes: 1 addition & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
21 changes: 8 additions & 13 deletions workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2e9f88c

Please sign in to comment.