Remove references to CoreOS Container Linux
* CoreOS Container Linux was deprecated in v1.18.3 (May 2020) in favor of Fedora CoreOS and Flatcar Linux. CoreOS Container Linux references were kept to give folks more time to migrate, but AMIs have now been deleted. Time is up. Rel: https://coreos.com/os/eol/
This commit is contained in:
parent
444363be2d
commit
343db5b578
|
@ -4,6 +4,13 @@ Notable changes between versions.
|
|||
|
||||
## Latest
|
||||
|
||||
### Flatcar Linux
|
||||
|
||||
* Remove references to CoreOS Container Linux ([#839](https://github.com/poseidon/typhoon/pull/839))
|
||||
* Fix error querying for coreos AMI on AWS ([#838](https://github.com/poseidon/typhoon/issues/838))
|
||||
|
||||
## v1.19.2
|
||||
|
||||
* Kubernetes [v1.19.2](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md#v1192)
|
||||
* Update flannel from v0.12.0 to v0.13.0-rc2 ([#216](https://github.com/poseidon/terraform-render-bootstrap/pull/216))
|
||||
* Update flannel-cni from v0.4.0 to v0.4.1
|
||||
|
|
|
@ -1,33 +1,10 @@
|
|||
locals {
|
||||
# Pick a CoreOS Container Linux derivative
|
||||
# coreos-stable -> Container Linux AMI
|
||||
# Pick a Flatcar Linux AMI
|
||||
# flatcar-stable -> Flatcar Linux AMI
|
||||
ami_id = local.flavor == "flatcar" ? data.aws_ami.flatcar.image_id : data.aws_ami.coreos.image_id
|
||||
|
||||
flavor = split("-", var.os_image)[0]
|
||||
ami_id = data.aws_ami.flatcar.image_id
|
||||
channel = split("-", var.os_image)[1]
|
||||
}
|
||||
|
||||
data "aws_ami" "coreos" {
|
||||
most_recent = true
|
||||
owners = ["595879546273"]
|
||||
|
||||
filter {
|
||||
name = "architecture"
|
||||
values = ["x86_64"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "virtualization-type"
|
||||
values = ["hvm"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["CoreOS-${local.flavor == "coreos" ? local.channel : "stable"}-*"]
|
||||
}
|
||||
}
|
||||
|
||||
data "aws_ami" "flatcar" {
|
||||
most_recent = true
|
||||
owners = ["075585003325"]
|
||||
|
@ -44,7 +21,7 @@ data "aws_ami" "flatcar" {
|
|||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["Flatcar-${local.flavor == "flatcar" ? local.channel : "stable"}-*"]
|
||||
values = ["Flatcar-${local.channel}-*"]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ data "template_file" "controller-configs" {
|
|||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
||||
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
cgroup_driver = local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||
ssh_authorized_key = var.ssh_authorized_key
|
||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||
|
|
|
@ -43,7 +43,7 @@ variable "worker_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
description = "AMI channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
default = "flatcar-stable"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,33 +1,10 @@
|
|||
locals {
|
||||
# Pick a CoreOS Container Linux derivative
|
||||
# coreos-stable -> Container Linux AMI
|
||||
# Pick a Flatcar Linux AMI
|
||||
# flatcar-stable -> Flatcar Linux AMI
|
||||
ami_id = local.flavor == "flatcar" ? data.aws_ami.flatcar.image_id : data.aws_ami.coreos.image_id
|
||||
|
||||
flavor = split("-", var.os_image)[0]
|
||||
ami_id = data.aws_ami.flatcar.image_id
|
||||
channel = split("-", var.os_image)[1]
|
||||
}
|
||||
|
||||
data "aws_ami" "coreos" {
|
||||
most_recent = true
|
||||
owners = ["595879546273"]
|
||||
|
||||
filter {
|
||||
name = "architecture"
|
||||
values = ["x86_64"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "virtualization-type"
|
||||
values = ["hvm"]
|
||||
}
|
||||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["CoreOS-${local.flavor == "coreos" ? local.channel : "stable"}-*"]
|
||||
}
|
||||
}
|
||||
|
||||
data "aws_ami" "flatcar" {
|
||||
most_recent = true
|
||||
owners = ["075585003325"]
|
||||
|
@ -44,7 +21,7 @@ data "aws_ami" "flatcar" {
|
|||
|
||||
filter {
|
||||
name = "name"
|
||||
values = ["Flatcar-${local.flavor == "flatcar" ? local.channel : "stable"}-*"]
|
||||
values = ["Flatcar-${local.channel}-*"]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ variable "instance_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "AMI channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
description = "AMI channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
default = "flatcar-stable"
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ data "template_file" "worker-config" {
|
|||
ssh_authorized_key = var.ssh_authorized_key
|
||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||
cluster_domain_suffix = var.cluster_domain_suffix
|
||||
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
cgroup_driver = local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
node_labels = join(",", var.node_labels)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,9 +16,7 @@ resource "azurerm_dns_a_record" "etcds" {
|
|||
|
||||
locals {
|
||||
# Container Linux derivative
|
||||
# coreos-stable -> Container Linux Stable
|
||||
# flatcar-stable -> Flatcar Linux Stable
|
||||
flavor = split("-", var.os_image)[0]
|
||||
channel = split("-", var.os_image)[1]
|
||||
}
|
||||
|
||||
|
@ -53,23 +51,18 @@ resource "azurerm_linux_virtual_machine" "controllers" {
|
|||
storage_account_type = "Premium_LRS"
|
||||
}
|
||||
|
||||
# CoreOS Container Linux or Flatcar Container Linux
|
||||
# Flatcar Container Linux
|
||||
source_image_reference {
|
||||
publisher = local.flavor == "flatcar" ? "Kinvolk" : "CoreOS"
|
||||
offer = local.flavor == "flatcar" ? "flatcar-container-linux-free" : "CoreOS"
|
||||
publisher = "Kinvolk"
|
||||
offer = "flatcar-container-linux-free"
|
||||
sku = local.channel
|
||||
version = "latest"
|
||||
}
|
||||
|
||||
# Gross hack for Flatcar Linux
|
||||
dynamic "plan" {
|
||||
for_each = local.flavor == "flatcar" ? [1] : []
|
||||
|
||||
content {
|
||||
name = local.channel
|
||||
publisher = "kinvolk"
|
||||
product = "flatcar-container-linux-free"
|
||||
}
|
||||
plan {
|
||||
name = local.channel
|
||||
publisher = "kinvolk"
|
||||
product = "flatcar-container-linux-free"
|
||||
}
|
||||
|
||||
# network
|
||||
|
@ -157,7 +150,7 @@ data "template_file" "controller-configs" {
|
|||
etcd_domain = "${var.cluster_name}-etcd${count.index}.${var.dns_zone}"
|
||||
# etcd0=https://cluster-etcd0.example.com,etcd1=https://cluster-etcd1.example.com,...
|
||||
etcd_initial_cluster = join(",", data.template_file.etcds.*.rendered)
|
||||
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
cgroup_driver = local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
kubeconfig = indent(10, module.bootstrap.kubeconfig-kubelet)
|
||||
ssh_authorized_key = var.ssh_authorized_key
|
||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||
|
|
|
@ -48,7 +48,7 @@ variable "worker_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge, coreos-stable, coreos-beta, coreos-alpha)"
|
||||
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
default = "flatcar-stable"
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ variable "vm_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge, coreos-stable, coreos-beta, coreos-alpha)"
|
||||
description = "Channel for a Container Linux derivative (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
default = "flatcar-stable"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
locals {
|
||||
# coreos-stable -> Container Linux Stable
|
||||
# flatcar-stable -> Flatcar Linux Stable
|
||||
flavor = split("-", var.os_image)[0]
|
||||
channel = split("-", var.os_image)[1]
|
||||
}
|
||||
|
||||
|
@ -24,23 +22,18 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
|
|||
caching = "ReadWrite"
|
||||
}
|
||||
|
||||
# CoreOS Container Linux or Flatcar Container Linux
|
||||
# Flatcar Container Linux
|
||||
source_image_reference {
|
||||
publisher = local.flavor == "flatcar" ? "Kinvolk" : "CoreOS"
|
||||
offer = local.flavor == "flatcar" ? "flatcar-container-linux-free" : "CoreOS"
|
||||
publisher = "Kinvolk"
|
||||
offer = "flatcar-container-linux-free"
|
||||
sku = local.channel
|
||||
version = "latest"
|
||||
}
|
||||
|
||||
# Gross hack for Flatcar Linux
|
||||
dynamic "plan" {
|
||||
for_each = local.flavor == "flatcar" ? [1] : []
|
||||
|
||||
content {
|
||||
name = local.channel
|
||||
publisher = "kinvolk"
|
||||
product = "flatcar-container-linux-free"
|
||||
}
|
||||
plan {
|
||||
name = local.channel
|
||||
publisher = "kinvolk"
|
||||
product = "flatcar-container-linux-free"
|
||||
}
|
||||
|
||||
# Azure requires setting admin_ssh_key, though Ignition custom_data handles it too
|
||||
|
@ -111,7 +104,7 @@ data "template_file" "worker-config" {
|
|||
ssh_authorized_key = var.ssh_authorized_key
|
||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||
cluster_domain_suffix = var.cluster_domain_suffix
|
||||
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
cgroup_driver = local.channel == "edge" ? "systemd" : "cgroupfs"
|
||||
node_labels = join(",", var.node_labels)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ variable "matchbox_http_endpoint" {
|
|||
|
||||
variable "os_channel" {
|
||||
type = string
|
||||
description = "Channel for a Container Linux derivative (coreos-stable, coreos-beta, coreos-alpha, flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
description = "Channel for a Flatcar Linux (flatcar-stable, flatcar-beta, flatcar-alpha, flatcar-edge)"
|
||||
}
|
||||
|
||||
variable "os_version" {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
locals {
|
||||
official_images = ["coreos-stable", "coreos-beta", "coreos-alpha"]
|
||||
official_images = []
|
||||
is_official_image = contains(local.official_images, var.os_image)
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ variable "worker_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Container Linux image for instances (e.g. coreos-stable, custom-image-id)"
|
||||
description = "Flatcar Linux image for instances (e.g. custom-image-id)"
|
||||
}
|
||||
|
||||
variable "controller_snippets" {
|
||||
|
|
|
@ -48,7 +48,7 @@ variable "worker_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Container Linux image for compute instances (e.g. coreos-stable, custom-image)"
|
||||
description = "Flatcar Linux image for compute instances (e.g. custom-image)"
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
|
|
|
@ -36,7 +36,7 @@ variable "machine_type" {
|
|||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Container Linux image for compute instanges (e.g. gcloud compute images list)"
|
||||
description = "Flatcar Linux image for compute instanges (e.g. gcloud compute images list)"
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
|
|
Loading…
Reference in New Issue