Skip to content

Commit

Permalink
fix: misspellings in comments and min_cpu_platform (#1207)
Browse files Browse the repository at this point in the history
* propagate enable_gcfs

* move changes to autogen

* Fix misspellings in comments and min_cpu_platform

Fix misspellings in comments and inconsistent lookup
in node_config.min_cpu_platform.

Co-authored-by: Bharath KKB <[email protected]>
  • Loading branch information
sasha-s and bharathkkb authored Apr 15, 2022
1 parent 55a1e15 commit 7553a2b
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
4 changes: 2 additions & 2 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -103,7 +103,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down
2 changes: 1 addition & 1 deletion cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
2 changes: 1 addition & 1 deletion modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ resource "google_container_node_pool" "pools" {
node_config {
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")
machine_type = lookup(each.value, "machine_type", "e2-medium")
min_cpu_platform = lookup(var.node_pools[0], "min_cpu_platform", "")
min_cpu_platform = lookup(each.value, "min_cpu_platform", "")
gcfs_config {
enabled = lookup(each.value, "enable_gcfs", false)
}
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -99,7 +99,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down
4 changes: 2 additions & 2 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module "gke" {

initial_node_count = var.initial_node_count

// We suggest removing the default node pull, as it cannot be modified without
// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
remove_default_node_pool = true

Expand All @@ -99,7 +99,7 @@ module "gke" {

// We either:
// - Create a dedicated service account with minimal permissions to run nodes.
// All applications shuold run with an identity defined via Workload Identity anyway.
// All applications should run with an identity defined via Workload Identity anyway.
// - Use a service account passed as a parameter to the module, in case the user
// wants to maintain control of their service accounts.
create_service_account = var.compute_engine_service_account == "" ? true : false
Expand Down

0 comments on commit 7553a2b

Please sign in to comment.