Set the Google Cloud minimum CPU platform to Intel Haswell

* Intel Haswell or better is available in every zone around the world
* Neither Kubernetes nor Typhoon have a particular minimum processor
family. However, a few Google Cloud zones still default to Sandy/Ivy
bridge (scheduled to shift April 2019). Price is only based on machine
type so it is beneficial to opt for the next processor family
* Intel Haswell is a suitable minimum since it still allows plenty of
liberty in choosing any region or machine type
* Likely a slight increase to preemption probability in a few zones,
but any lower probability on Sandy/Ivy bridge is due to lower
desirability as they're phased out
* https://cloud.google.com/compute/docs/regions-zones/
This commit is contained in:
Dalton Hubble 2019-02-18 12:54:07 -08:00
parent e483c81ce9
commit ba4c5de052
5 changed files with 22 additions and 12 deletions

View File

@ -11,6 +11,12 @@ Notable changes between versions.
* Recommend updating [terraform-provider-matchbox](https://github.com/coreos/terraform-provider-matchbox) plugin from v0.2.2 to [v0.2.3](https://github.com/coreos/terraform-provider-matchbox/releases/tag/v0.2.3) ([#402](https://github.com/poseidon/typhoon/pull/402)) * Recommend updating [terraform-provider-matchbox](https://github.com/coreos/terraform-provider-matchbox) plugin from v0.2.2 to [v0.2.3](https://github.com/coreos/terraform-provider-matchbox/releases/tag/v0.2.3) ([#402](https://github.com/poseidon/typhoon/pull/402))
#### Google Cloud
* Set the minimum CPU platform to Intel Haswell ([#405](https://github.com/poseidon/typhoon/pull/405))
* Haswell or better is available in every zone (no price change)
* A few zones still default to Sandy/Ivy Bridge (shifts in April 2019)
#### Addons #### Addons
* Improve Prometheus rules and alerts ([#404](https://github.com/poseidon/typhoon/pull/404)) * Improve Prometheus rules and alerts ([#404](https://github.com/poseidon/typhoon/pull/404))

View File

@ -34,6 +34,7 @@ resource "google_compute_instance" "controllers" {
name = "${var.cluster_name}-controller-${count.index}" name = "${var.cluster_name}-controller-${count.index}"
zone = "${element(local.zones, count.index)}" zone = "${element(local.zones, count.index)}"
machine_type = "${var.controller_type}" machine_type = "${var.controller_type}"
min_cpu_platform = "Intel Haswell"
metadata { metadata {
user-data = "${element(data.ct_config.controller-ignitions.*.rendered, count.index)}" user-data = "${element(data.ct_config.controller-ignitions.*.rendered, count.index)}"

View File

@ -26,6 +26,7 @@ resource "google_compute_instance_template" "worker" {
name_prefix = "${var.name}-worker-" name_prefix = "${var.name}-worker-"
description = "Worker Instance template" description = "Worker Instance template"
machine_type = "${var.machine_type}" machine_type = "${var.machine_type}"
min_cpu_platform = "Intel Haswell"
metadata { metadata {
user-data = "${data.ct_config.worker-ignition.rendered}" user-data = "${data.ct_config.worker-ignition.rendered}"

View File

@ -34,6 +34,7 @@ resource "google_compute_instance" "controllers" {
name = "${var.cluster_name}-controller-${count.index}" name = "${var.cluster_name}-controller-${count.index}"
zone = "${element(local.zones, count.index)}" zone = "${element(local.zones, count.index)}"
machine_type = "${var.controller_type}" machine_type = "${var.controller_type}"
min_cpu_platform = "Intel Haswell"
metadata { metadata {
user-data = "${element(data.template_file.controller-cloudinit.*.rendered, count.index)}" user-data = "${element(data.template_file.controller-cloudinit.*.rendered, count.index)}"

View File

@ -26,6 +26,7 @@ resource "google_compute_instance_template" "worker" {
name_prefix = "${var.name}-worker-" name_prefix = "${var.name}-worker-"
description = "Worker Instance template" description = "Worker Instance template"
machine_type = "${var.machine_type}" machine_type = "${var.machine_type}"
min_cpu_platform = "Intel Haswell"
metadata { metadata {
user-data = "${data.template_file.worker-cloudinit.rendered}" user-data = "${data.template_file.worker-cloudinit.rendered}"