mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-23 01:21:33 +02:00
Switch to using Flatcar Linux images on Google Cloud
* Use the official Kinvolk Flatcar Linux image on Google Cloud * Change `os_image` from a custom image name to `flatcar-stable` (default), `flatcar-beta`, or `flatcar-alpha` (**action required**) * Change `os_image` from a required to an optional variable * Promote Typhoon on Flatcar Linux / Google Cloud to stable * Remove docs about needing to upload a Flatcar Linux image manually on Google Cloud and drop support for custom images
This commit is contained in:
@ -42,7 +42,7 @@ resource "google_compute_instance" "controllers" {
|
||||
auto_delete = true
|
||||
|
||||
initialize_params {
|
||||
image = var.os_image
|
||||
image = data.google_compute_image.flatcar-linux.self_link
|
||||
size = var.disk_size
|
||||
}
|
||||
}
|
||||
|
6
google-cloud/flatcar-linux/kubernetes/image.tf
Normal file
6
google-cloud/flatcar-linux/kubernetes/image.tf
Normal file
@ -0,0 +1,6 @@
|
||||
# Flatcar Linux most recent image from channel
|
||||
data "google_compute_image" "flatcar-linux" {
|
||||
project = "kinvolk-public"
|
||||
family = "${var.os_image}"
|
||||
}
|
||||
|
@ -48,7 +48,13 @@ variable "worker_type" {
|
||||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Flatcar Linux image for compute instances (e.g. custom-image)"
|
||||
description = "Flatcar Linux image for compute instances (flatcar-stable, flatcar-beta, flatcar-alpha)"
|
||||
default = "flatcar-stable"
|
||||
|
||||
validation {
|
||||
condition = contains(["flatcar-stable", "flatcar-beta", "flatcar-alpha"], var.os_image)
|
||||
error_message = "The os_image must be flatcar-stable, flatcar-beta, or flatcar-alpha."
|
||||
}
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
|
5
google-cloud/flatcar-linux/kubernetes/workers/image.tf
Normal file
5
google-cloud/flatcar-linux/kubernetes/workers/image.tf
Normal file
@ -0,0 +1,5 @@
|
||||
# Flatcar Linux most recent image from channel
|
||||
data "google_compute_image" "flatcar-linux" {
|
||||
project = "kinvolk-public"
|
||||
family = "${var.os_image}"
|
||||
}
|
@ -36,7 +36,13 @@ variable "machine_type" {
|
||||
|
||||
variable "os_image" {
|
||||
type = string
|
||||
description = "Flatcar Linux image for compute instanges (e.g. gcloud compute images list)"
|
||||
description = "Flatcar Linux image for compute instances (flatcar-stable, flatcar-beta, flatcar-alpha)"
|
||||
default = "flatcar-stable"
|
||||
|
||||
validation {
|
||||
condition = contains(["flatcar-stable", "flatcar-beta", "flatcar-alpha"], var.os_image)
|
||||
error_message = "The os_image must be flatcar-stable, flatcar-beta, or flatcar-alpha."
|
||||
}
|
||||
}
|
||||
|
||||
variable "disk_size" {
|
||||
|
@ -43,7 +43,7 @@ resource "google_compute_instance_template" "worker" {
|
||||
disk {
|
||||
auto_delete = true
|
||||
boot = true
|
||||
source_image = var.os_image
|
||||
source_image = data.google_compute_image.flatcar-linux.self_link
|
||||
disk_size_gb = var.disk_size
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user