Skip to content

Commit

Permalink
feat: Node pools can enable fast_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
fraenkel committed Dec 4, 2024
1 parent e9ab0df commit 7e07d29
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 0 deletions.
13 changes: 13 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -925,6 +932,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -641,6 +648,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -932,6 +945,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -794,6 +801,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -1099,6 +1112,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -709,6 +716,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -1013,6 +1026,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -773,6 +780,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -1078,6 +1091,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -688,6 +695,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -992,6 +1005,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -746,6 +753,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -1038,6 +1051,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down
19 changes: 19 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "fast_socket" {
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}

dynamic "kubelet_config" {
for_each = length(setintersection(
keys(var.node_pools[0]),
Expand Down Expand Up @@ -662,6 +669,12 @@ resource "google_container_node_pool" "pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down Expand Up @@ -953,6 +966,12 @@ resource "google_container_node_pool" "windows_pools" {
enabled = gvnic.value
}
}
dynamic "fast_socket" {
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
content {
enabled = fast_socket.value
}
}
dynamic "reservation_affinity" {
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
content {
Expand Down

0 comments on commit 7e07d29

Please sign in to comment.