1
0
mirror of https://github.com/poseidon/typhoon synced 2024-11-08 08:49:20 +01:00

google: Use regional instance templates for workers

* Use regional instance templates for the worker node regional
managed instance groups. Regional instance templates are kept in
the associated region, whereas the older "global" instance templates
were kept in a particular region (regardless of where the MIG region)
so outages in a region X could affect clusters in a region Y which
is undesired
This commit is contained in:
Dalton Hubble 2024-08-27 21:30:55 -07:00
parent be9ba51269
commit 7d2d8e16e5
No known key found for this signature in database
GPG Key ID: BD34C2E3EF32B7A0
3 changed files with 9 additions and 4 deletions

@ -16,6 +16,11 @@ Notable changes between versions.
* The Amazon DNS server can resolve A and AAAA queries to IPv4 and IPv6 node addresses
* Tag controller node EBS volumes with a name based on the controller node name
### Google
* Use `google_compute_region_instance_template` instead of `google_compute_instance_template`
* Google's regional instance template metadata is kept in the associated region for greater resiliency. The "global" instance templates were kept in a single region
## v1.30.4
* Kubernetes [v1.30.4](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.30.md#v1304)

@ -8,7 +8,7 @@ resource "google_compute_region_instance_group_manager" "workers" {
region = var.region
version {
name = "default"
instance_template = google_compute_instance_template.worker.self_link
instance_template = google_compute_region_instance_template.worker.self_link
}
# Roll out MIG instance template changes by replacing instances.
@ -58,7 +58,7 @@ resource "google_compute_health_check" "worker" {
}
# Worker instance template
resource "google_compute_instance_template" "worker" {
resource "google_compute_region_instance_template" "worker" {
name_prefix = "${var.name}-worker-"
description = "${var.name} worker instance template"
machine_type = var.machine_type

@ -8,7 +8,7 @@ resource "google_compute_region_instance_group_manager" "workers" {
region = var.region
version {
name = "default"
instance_template = google_compute_instance_template.worker.self_link
instance_template = google_compute_region_instance_template.worker.self_link
}
# Roll out MIG instance template changes by replacing instances.
@ -58,7 +58,7 @@ resource "google_compute_health_check" "worker" {
}
# Worker instance template
resource "google_compute_instance_template" "worker" {
resource "google_compute_region_instance_template" "worker" {
name_prefix = "${var.name}-worker-"
description = "Worker Instance template"
machine_type = var.machine_type