From 01905b00bc11521e2044dfd38dea6e1db69dfb73 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 13 May 2020 21:37:18 -0700 Subject: [PATCH] Support Fedora CoreOS OS image streams on AWS * Add `os_stream` variable to set the stream to stable (default), testing, or next * Remove unused os_image variable on Fedora CoreOS AWS --- CHANGES.md | 8 +++++++- aws/fedora-coreos/kubernetes/ami.tf | 10 +--------- aws/fedora-coreos/kubernetes/variables.tf | 4 ++-- aws/fedora-coreos/kubernetes/workers.tf | 2 +- aws/fedora-coreos/kubernetes/workers/ami.tf | 10 +--------- aws/fedora-coreos/kubernetes/workers/variables.tf | 4 ++-- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 49134b39..f860e298 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,9 +20,15 @@ Notable changes between versions. * SELinux enforcement requires consistent file context MCS level * Restarting a node resolved the issue as a previous workaround +#### AWS + +* Support Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#727](https://github.com/poseidon/typhoon/pull/727)) + * Add `os_stream` variable to set the stream to `stable` (default), `testing`, or `next` + * Remove unused `os_image` variable + #### Google -* Use new Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#723](https://github.com/poseidon/typhoon/pull/722)) +* Support Fedora CoreOS official [image streams](https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/) ([#723](https://github.com/poseidon/typhoon/pull/722)) * Add `os_stream` variable to set the stream to `stable` (default), `testing`, or `next` * Deprecate `os_image` variable. Manual image uploads are no longer needed diff --git a/aws/fedora-coreos/kubernetes/ami.tf b/aws/fedora-coreos/kubernetes/ami.tf index e32ce159..a7ab184b 100644 --- a/aws/fedora-coreos/kubernetes/ami.tf +++ b/aws/fedora-coreos/kubernetes/ami.tf @@ -13,16 +13,8 @@ data "aws_ami" "fedora-coreos" { values = ["hvm"] } - filter { - name = "name" - values = ["fedora-coreos-31.*.*.*-hvm"] - } - filter { name = "description" - values = ["Fedora CoreOS stable*"] + values = ["Fedora CoreOS ${var.os_stream} *"] } - - # try to filter out dev images (AWS filters can't) - name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*" } diff --git a/aws/fedora-coreos/kubernetes/variables.tf b/aws/fedora-coreos/kubernetes/variables.tf index 13284f63..a34493ec 100644 --- a/aws/fedora-coreos/kubernetes/variables.tf +++ b/aws/fedora-coreos/kubernetes/variables.tf @@ -41,9 +41,9 @@ variable "worker_type" { default = "t3.small" } -variable "os_image" { +variable "os_stream" { type = string - description = "AMI channel for Fedora CoreOS (not yet used)" + description = "Fedora CoreOs image stream for instances (e.g. stable, testing, next)" default = "stable" } diff --git a/aws/fedora-coreos/kubernetes/workers.tf b/aws/fedora-coreos/kubernetes/workers.tf index e8b57e62..d02e5288 100644 --- a/aws/fedora-coreos/kubernetes/workers.tf +++ b/aws/fedora-coreos/kubernetes/workers.tf @@ -8,7 +8,7 @@ module "workers" { security_groups = [aws_security_group.worker.id] worker_count = var.worker_count instance_type = var.worker_type - os_image = var.os_image + os_stream = var.os_stream disk_size = var.disk_size spot_price = var.worker_price target_groups = var.worker_target_groups diff --git a/aws/fedora-coreos/kubernetes/workers/ami.tf b/aws/fedora-coreos/kubernetes/workers/ami.tf index e32ce159..a7ab184b 100644 --- a/aws/fedora-coreos/kubernetes/workers/ami.tf +++ b/aws/fedora-coreos/kubernetes/workers/ami.tf @@ -13,16 +13,8 @@ data "aws_ami" "fedora-coreos" { values = ["hvm"] } - filter { - name = "name" - values = ["fedora-coreos-31.*.*.*-hvm"] - } - filter { name = "description" - values = ["Fedora CoreOS stable*"] + values = ["Fedora CoreOS ${var.os_stream} *"] } - - # try to filter out dev images (AWS filters can't) - name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*" } diff --git a/aws/fedora-coreos/kubernetes/workers/variables.tf b/aws/fedora-coreos/kubernetes/workers/variables.tf index 6c21d0a0..76b33cbf 100644 --- a/aws/fedora-coreos/kubernetes/workers/variables.tf +++ b/aws/fedora-coreos/kubernetes/workers/variables.tf @@ -34,9 +34,9 @@ variable "instance_type" { default = "t3.small" } -variable "os_image" { +variable "os_stream" { type = string - description = "AMI channel for Fedora CoreOS (not yet used)" + description = "Fedora CoreOs image stream for instances (e.g. stable, testing, next)" default = "stable" }