Skip to content

Commit d4f4d0a

Browse files
author
Michael Fraenkel
committed
feat: Node pools can enable fast_socket
1 parent e9ab0df commit d4f4d0a

File tree

8 files changed

+146
-0
lines changed

8 files changed

+146
-0
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,13 @@ resource "google_container_cluster" "primary" {
537537
}
538538
}
539539

540+
dynamic "fast_socket" {
541+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
542+
content {
543+
enabled = fast_socket.value
544+
}
545+
}
546+
540547
dynamic "kubelet_config" {
541548
for_each = length(setintersection(
542549
keys(var.node_pools[0]),
@@ -925,6 +932,12 @@ resource "google_container_node_pool" "windows_pools" {
925932
enabled = gvnic.value
926933
}
927934
}
935+
dynamic "fast_socket" {
936+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
937+
content {
938+
enabled = fast_socket.value
939+
}
940+
}
928941
dynamic "reservation_affinity" {
929942
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
930943
content {

cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
418418
}
419419
}
420420

421+
dynamic "fast_socket" {
422+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
423+
content {
424+
enabled = fast_socket.value
425+
}
426+
}
427+
421428
dynamic "kubelet_config" {
422429
for_each = length(setintersection(
423430
keys(var.node_pools[0]),
@@ -641,6 +648,12 @@ resource "google_container_node_pool" "pools" {
641648
enabled = gvnic.value
642649
}
643650
}
651+
dynamic "fast_socket" {
652+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
653+
content {
654+
enabled = fast_socket.value
655+
}
656+
}
644657
dynamic "reservation_affinity" {
645658
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
646659
content {
@@ -932,6 +945,12 @@ resource "google_container_node_pool" "windows_pools" {
932945
enabled = gvnic.value
933946
}
934947
}
948+
dynamic "fast_socket" {
949+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
950+
content {
951+
enabled = fast_socket.value
952+
}
953+
}
935954
dynamic "reservation_affinity" {
936955
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
937956
content {

modules/beta-private-cluster-update-variant/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
456456
}
457457
}
458458

459+
dynamic "fast_socket" {
460+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
461+
content {
462+
enabled = fast_socket.value
463+
}
464+
}
465+
459466
dynamic "kubelet_config" {
460467
for_each = length(setintersection(
461468
keys(var.node_pools[0]),
@@ -794,6 +801,12 @@ resource "google_container_node_pool" "pools" {
794801
enabled = gvnic.value
795802
}
796803
}
804+
dynamic "fast_socket" {
805+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
806+
content {
807+
enabled = fast_socket.value
808+
}
809+
}
797810
dynamic "reservation_affinity" {
798811
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
799812
content {
@@ -1099,6 +1112,12 @@ resource "google_container_node_pool" "windows_pools" {
10991112
enabled = gvnic.value
11001113
}
11011114
}
1115+
dynamic "fast_socket" {
1116+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
1117+
content {
1118+
enabled = fast_socket.value
1119+
}
1120+
}
11021121
dynamic "reservation_affinity" {
11031122
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
11041123
content {

modules/beta-private-cluster/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
456456
}
457457
}
458458

459+
dynamic "fast_socket" {
460+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
461+
content {
462+
enabled = fast_socket.value
463+
}
464+
}
465+
459466
dynamic "kubelet_config" {
460467
for_each = length(setintersection(
461468
keys(var.node_pools[0]),
@@ -709,6 +716,12 @@ resource "google_container_node_pool" "pools" {
709716
enabled = gvnic.value
710717
}
711718
}
719+
dynamic "fast_socket" {
720+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
721+
content {
722+
enabled = fast_socket.value
723+
}
724+
}
712725
dynamic "reservation_affinity" {
713726
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
714727
content {
@@ -1013,6 +1026,12 @@ resource "google_container_node_pool" "windows_pools" {
10131026
enabled = gvnic.value
10141027
}
10151028
}
1029+
dynamic "fast_socket" {
1030+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
1031+
content {
1032+
enabled = fast_socket.value
1033+
}
1034+
}
10161035
dynamic "reservation_affinity" {
10171036
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
10181037
content {

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
456456
}
457457
}
458458

459+
dynamic "fast_socket" {
460+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
461+
content {
462+
enabled = fast_socket.value
463+
}
464+
}
465+
459466
dynamic "kubelet_config" {
460467
for_each = length(setintersection(
461468
keys(var.node_pools[0]),
@@ -773,6 +780,12 @@ resource "google_container_node_pool" "pools" {
773780
enabled = gvnic.value
774781
}
775782
}
783+
dynamic "fast_socket" {
784+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
785+
content {
786+
enabled = fast_socket.value
787+
}
788+
}
776789
dynamic "reservation_affinity" {
777790
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
778791
content {
@@ -1078,6 +1091,12 @@ resource "google_container_node_pool" "windows_pools" {
10781091
enabled = gvnic.value
10791092
}
10801093
}
1094+
dynamic "fast_socket" {
1095+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
1096+
content {
1097+
enabled = fast_socket.value
1098+
}
1099+
}
10811100
dynamic "reservation_affinity" {
10821101
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
10831102
content {

modules/beta-public-cluster/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,13 @@ resource "google_container_cluster" "primary" {
456456
}
457457
}
458458

459+
dynamic "fast_socket" {
460+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
461+
content {
462+
enabled = fast_socket.value
463+
}
464+
}
465+
459466
dynamic "kubelet_config" {
460467
for_each = length(setintersection(
461468
keys(var.node_pools[0]),
@@ -688,6 +695,12 @@ resource "google_container_node_pool" "pools" {
688695
enabled = gvnic.value
689696
}
690697
}
698+
dynamic "fast_socket" {
699+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
700+
content {
701+
enabled = fast_socket.value
702+
}
703+
}
691704
dynamic "reservation_affinity" {
692705
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
693706
content {
@@ -992,6 +1005,12 @@ resource "google_container_node_pool" "windows_pools" {
9921005
enabled = gvnic.value
9931006
}
9941007
}
1008+
dynamic "fast_socket" {
1009+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
1010+
content {
1011+
enabled = fast_socket.value
1012+
}
1013+
}
9951014
dynamic "reservation_affinity" {
9961015
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
9971016
content {

modules/private-cluster-update-variant/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
418418
}
419419
}
420420

421+
dynamic "fast_socket" {
422+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
423+
content {
424+
enabled = fast_socket.value
425+
}
426+
}
427+
421428
dynamic "kubelet_config" {
422429
for_each = length(setintersection(
423430
keys(var.node_pools[0]),
@@ -746,6 +753,12 @@ resource "google_container_node_pool" "pools" {
746753
enabled = gvnic.value
747754
}
748755
}
756+
dynamic "fast_socket" {
757+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
758+
content {
759+
enabled = fast_socket.value
760+
}
761+
}
749762
dynamic "reservation_affinity" {
750763
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
751764
content {
@@ -1038,6 +1051,12 @@ resource "google_container_node_pool" "windows_pools" {
10381051
enabled = gvnic.value
10391052
}
10401053
}
1054+
dynamic "fast_socket" {
1055+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
1056+
content {
1057+
enabled = fast_socket.value
1058+
}
1059+
}
10411060
dynamic "reservation_affinity" {
10421061
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
10431062
content {

modules/private-cluster/cluster.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,13 @@ resource "google_container_cluster" "primary" {
418418
}
419419
}
420420

421+
dynamic "fast_socket" {
422+
for_each = lookup(var.node_pools[0], "enable_fast_socket", false) ? [true] : []
423+
content {
424+
enabled = fast_socket.value
425+
}
426+
}
427+
421428
dynamic "kubelet_config" {
422429
for_each = length(setintersection(
423430
keys(var.node_pools[0]),
@@ -662,6 +669,12 @@ resource "google_container_node_pool" "pools" {
662669
enabled = gvnic.value
663670
}
664671
}
672+
dynamic "fast_socket" {
673+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
674+
content {
675+
enabled = fast_socket.value
676+
}
677+
}
665678
dynamic "reservation_affinity" {
666679
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
667680
content {
@@ -953,6 +966,12 @@ resource "google_container_node_pool" "windows_pools" {
953966
enabled = gvnic.value
954967
}
955968
}
969+
dynamic "fast_socket" {
970+
for_each = lookup(each.value, "enable_fast_socket", false) ? [true] : []
971+
content {
972+
enabled = fast_socket.value
973+
}
974+
}
956975
dynamic "reservation_affinity" {
957976
for_each = lookup(each.value, "queued_provisioning", false) || lookup(each.value, "consume_reservation_type", "") != "" ? [each.value] : []
958977
content {

0 commit comments

Comments
 (0)