Skip to content

Commit

Permalink
feat: Changed default node pool machine type to e2-medium (#597)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The default machine type has been changed to `e2-medium`. If you want the old default, you should specify it explicitly: `machine_type = "n1-standard-2"`.
  • Loading branch information
morgante committed Jul 9, 2020
1 parent ebdf57d commit 1de41ef
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -38,7 +38,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
min_count = 1
max_count = 100
local_ssd_count = 0
Expand Down Expand Up @@ -196,7 +196,7 @@ The node_pools variable takes the following parameters:
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
| name | The name of the node pool | | Required |
Expand Down
4 changes: 2 additions & 2 deletions autogen/main/README.md
Expand Up @@ -78,7 +78,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
{% if beta_cluster %}
node_locations = "us-central1-b,us-central1-c"
{% endif %}
Expand Down Expand Up @@ -178,7 +178,7 @@ The node_pools variable takes the following parameters:
| key | The key required for the taint | | Required |
{% endif %}
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
{% if beta_cluster %}
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Expand Up @@ -426,7 +426,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion cluster.tf
Expand Up @@ -182,7 +182,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 0 additions & 2 deletions examples/node_pool/main.tf
Expand Up @@ -48,7 +48,6 @@ module "gke" {
},
{
name = "pool-02"
machine_type = "n1-standard-2"
min_count = 1
max_count = 2
local_ssd_count = 0
Expand All @@ -65,7 +64,6 @@ module "gke" {
node_locations = "${var.region}-b,${var.region}-c"
autoscaling = false
node_count = 2
machine_type = "n1-standard-2"
disk_type = "pd-standard"
image_type = "COS"
auto_upgrade = true
Expand Down
1 change: 0 additions & 1 deletion examples/node_pool_update_variant/main.tf
Expand Up @@ -63,7 +63,6 @@ module "gke" {
},
{
name = "pool-02"
machine_type = "n1-standard-2"
min_count = 1
max_count = 2
disk_size_gb = 30
Expand Down
1 change: 0 additions & 1 deletion examples/node_pool_update_variant_beta/main.tf
Expand Up @@ -64,7 +64,6 @@ module "gke" {
},
{
name = "pool-02"
machine_type = "n1-standard-2"
min_count = 1
max_count = 2
disk_size_gb = 30
Expand Down
1 change: 0 additions & 1 deletion examples/safer_cluster_iap_bastion/cluster.tf
Expand Up @@ -35,7 +35,6 @@ module "gke" {
name = "safer-pool"
min_count = 1
max_count = 4
machine_type = "n1-standard-2"
auto_upgrade = true
node_metadata = "GKE_METADATA_SERVER"
}
Expand Down
1 change: 0 additions & 1 deletion examples/simple_regional_private/main.tf
Expand Up @@ -50,7 +50,6 @@ module "gke" {
node_pools = [
{
name = "pool-01"
machine_type = "n1-standard-2"
min_count = 1
max_count = 100
local_ssd_count = 0
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster-update-variant/README.md
Expand Up @@ -69,7 +69,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
node_locations = "us-central1-b,us-central1-c"
min_count = 1
max_count = 100
Expand Down Expand Up @@ -279,7 +279,7 @@ The node_pools variable takes the following parameters:
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| key | The key required for the taint | | Required |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Expand Up @@ -384,7 +384,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-private-cluster/README.md
Expand Up @@ -47,7 +47,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
node_locations = "us-central1-b,us-central1-c"
min_count = 1
max_count = 100
Expand Down Expand Up @@ -257,7 +257,7 @@ The node_pools variable takes the following parameters:
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| key | The key required for the taint | | Required |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/cluster.tf
Expand Up @@ -312,7 +312,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster-update-variant/README.md
Expand Up @@ -63,7 +63,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
node_locations = "us-central1-b,us-central1-c"
min_count = 1
max_count = 100
Expand Down Expand Up @@ -267,7 +267,7 @@ The node_pools variable takes the following parameters:
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| key | The key required for the taint | | Required |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/cluster.tf
Expand Up @@ -371,7 +371,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/beta-public-cluster/README.md
Expand Up @@ -41,7 +41,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
node_locations = "us-central1-b,us-central1-c"
min_count = 1
max_count = 100
Expand Down Expand Up @@ -245,7 +245,7 @@ The node_pools variable takes the following parameters:
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| key | The key required for the taint | | Required |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/cluster.tf
Expand Up @@ -299,7 +299,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/private-cluster-update-variant/README.md
Expand Up @@ -66,7 +66,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
min_count = 1
max_count = 100
local_ssd_count = 0
Expand Down Expand Up @@ -230,7 +230,7 @@ The node_pools variable takes the following parameters:
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
| name | The name of the node pool | | Required |
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/cluster.tf
Expand Up @@ -267,7 +267,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
4 changes: 2 additions & 2 deletions modules/private-cluster/README.md
Expand Up @@ -44,7 +44,7 @@ module "gke" {
node_pools = [
{
name = "default-node-pool"
machine_type = "n1-standard-2"
machine_type = "e2-medium"
min_count = 1
max_count = 100
local_ssd_count = 0
Expand Down Expand Up @@ -208,7 +208,7 @@ The node_pools variable takes the following parameters:
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
| name | The name of the node pool | | Required |
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/cluster.tf
Expand Up @@ -195,7 +195,7 @@ resource "google_container_node_pool" "pools" {

node_config {
image_type = lookup(each.value, "image_type", "COS")
machine_type = lookup(each.value, "machine_type", "n1-standard-2")
machine_type = lookup(each.value, "machine_type", "e2-medium")
labels = merge(
lookup(lookup(local.node_pools_labels, "default_values", {}), "cluster_name", true) ? { "cluster_name" = var.name } : {},
lookup(lookup(local.node_pools_labels, "default_values", {}), "node_pool", true) ? { "node_pool" = each.value["name"] } : {},
Expand Down
2 changes: 1 addition & 1 deletion test/integration/beta_cluster/controls/gcloud.rb
Expand Up @@ -148,7 +148,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
6 changes: 3 additions & 3 deletions test/integration/node_pool/controls/gcloud.rb
Expand Up @@ -79,7 +79,7 @@
including(
"name" => "pool-01",
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down Expand Up @@ -190,7 +190,7 @@
including(
"name" => "pool-02",
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down Expand Up @@ -319,7 +319,7 @@
including(
"name" => "pool-03",
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/safer_cluster/controls/gcloud.rb
Expand Up @@ -124,7 +124,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/simple_regional/controls/gcloud.rb
Expand Up @@ -104,7 +104,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
Expand Up @@ -110,7 +110,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
Expand Up @@ -104,7 +104,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
Expand Up @@ -104,7 +104,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/simple_zonal/controls/gcloud.rb
Expand Up @@ -119,7 +119,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/simple_zonal_private/controls/gcloud.rb
Expand Up @@ -110,7 +110,7 @@
expect(node_pools).to include(
including(
"config" => including(
"machineType" => "n1-standard-2",
"machineType" => "e2-medium",
),
)
)
Expand Down

0 comments on commit 1de41ef

Please sign in to comment.