Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add threads_per_core setting for node config in node pools #1942

Merged
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ The node_pools variable takes the following parameters:
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,13 @@ resource "google_container_node_pool" "windows_pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
7 changes: 7 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ The node_pools variable takes the following parameters:
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/beta-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ The node_pools variable takes the following parameters:
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/beta-public-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ The node_pools variable takes the following parameters:
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/beta-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ The node_pools variable takes the following parameters:
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ The node_pools variable takes the following parameters:
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ The node_pools variable takes the following parameters:
| spot | A boolean that represents whether the underlying node VMs are spot | false | Optional |
| service_account | The service account to be used by the Node VMs | " " | Optional |
| tags | The list of instance tags applied to all nodes | | Required |
| threads_per_core | The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1. If unset, the maximum number of threads supported per core by the underlying processor is assumed | | Optional |
| value | The value for the taint | | Required |
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
| location_policy | [Location policy](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_node_pool#location_policy) specifies the algorithm used when scaling-up the node pool. Location policy is supported only in 1.24.1+ clusters. | " " | Optional |
Expand Down
7 changes: 7 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,13 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "advanced_machine_features" {
for_each = lookup(each.value, "threads_per_core", 0) > 0 ? [1] : []
content {
threads_per_core = lookup(each.value, "threads_per_core", 0)
}
}

dynamic "workload_metadata_config" {
for_each = local.cluster_node_metadata_config

Expand Down
Loading