Skip to content

Commit 2bd9cbd

Browse files
authored
feat: support total_egress_bandwidth_tier (#2207)
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
1 parent 0e997c7 commit 2bd9cbd

File tree

16 files changed

+128
-15
lines changed

16 files changed

+128
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ The node_pools variable takes the following parameters:
374374
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
375375
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
376376
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
377+
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
377378
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
378379
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
379380
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |

autogen/main/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ The node_pools variable takes the following parameters:
263263
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
264264
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
265265
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
266+
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
266267
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
267268
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
268269
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,14 +923,21 @@ resource "google_container_node_pool" "windows_pools" {
923923
}
924924

925925
dynamic "network_config" {
926-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
926+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
927927
content {
928928
pod_range = lookup(network_config.value, "pod_range", null)
929929
{% if private_cluster %}
930930
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", var.enable_private_nodes)
931931
{% else %}
932932
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
933933
{% endif %}
934+
935+
dynamic "network_performance_config" {
936+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
937+
content {
938+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
939+
}
940+
}
934941
}
935942
}
936943

cluster.tf

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,17 @@ resource "google_container_node_pool" "pools" {
634634
}
635635

636636
dynamic "network_config" {
637-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
637+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
638638
content {
639639
pod_range = lookup(network_config.value, "pod_range", null)
640640
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
641+
642+
dynamic "network_performance_config" {
643+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
644+
content {
645+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
646+
}
647+
}
641648
}
642649
}
643650

@@ -950,10 +957,17 @@ resource "google_container_node_pool" "windows_pools" {
950957
}
951958

952959
dynamic "network_config" {
953-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
960+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
954961
content {
955962
pod_range = lookup(network_config.value, "pod_range", null)
956963
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
964+
965+
dynamic "network_performance_config" {
966+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
967+
content {
968+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
969+
}
970+
}
957971
}
958972
}
959973

modules/beta-private-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ The node_pools variable takes the following parameters:
427427
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
428428
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
429429
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
430+
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
430431
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
431432
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
432433
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,17 @@ resource "google_container_node_pool" "pools" {
784784
}
785785

786786
dynamic "network_config" {
787-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
787+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
788788
content {
789789
pod_range = lookup(network_config.value, "pod_range", null)
790790
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", var.enable_private_nodes)
791+
792+
dynamic "network_performance_config" {
793+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
794+
content {
795+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
796+
}
797+
}
791798
}
792799
}
793800

@@ -1114,10 +1121,17 @@ resource "google_container_node_pool" "windows_pools" {
11141121
}
11151122

11161123
dynamic "network_config" {
1117-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
1124+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
11181125
content {
11191126
pod_range = lookup(network_config.value, "pod_range", null)
11201127
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", var.enable_private_nodes)
1128+
1129+
dynamic "network_performance_config" {
1130+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
1131+
content {
1132+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
1133+
}
1134+
}
11211135
}
11221136
}
11231137

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ The node_pools variable takes the following parameters:
405405
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
406406
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
407407
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
408+
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
408409
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
409410
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
410411
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |

modules/beta-private-cluster/cluster.tf

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,17 @@ resource "google_container_node_pool" "pools" {
703703
}
704704

705705
dynamic "network_config" {
706-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
706+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
707707
content {
708708
pod_range = lookup(network_config.value, "pod_range", null)
709709
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", var.enable_private_nodes)
710+
711+
dynamic "network_performance_config" {
712+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
713+
content {
714+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
715+
}
716+
}
710717
}
711718
}
712719

@@ -1032,10 +1039,17 @@ resource "google_container_node_pool" "windows_pools" {
10321039
}
10331040

10341041
dynamic "network_config" {
1035-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
1042+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
10361043
content {
10371044
pod_range = lookup(network_config.value, "pod_range", null)
10381045
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", var.enable_private_nodes)
1046+
1047+
dynamic "network_performance_config" {
1048+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
1049+
content {
1050+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
1051+
}
1052+
}
10391053
}
10401054
}
10411055

modules/beta-public-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ The node_pools variable takes the following parameters:
415415
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
416416
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
417417
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
418+
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. Valid values are: "TIER_1" and "TIER_UNSPECIFIED". | | Optional |
418419
| consume_reservation_type | The type of reservation consumption. Accepted values are: "UNSPECIFIED": Default value (should not be specified). "NO_RESERVATION": Do not consume from any reserved capacity, "ANY_RESERVATION": Consume any reservation available, "SPECIFIC_RESERVATION": Must consume from a specific reservation. Must specify key value fields for specifying the reservations. | | Optional |
419420
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
420421
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,10 +761,17 @@ resource "google_container_node_pool" "pools" {
761761
}
762762

763763
dynamic "network_config" {
764-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
764+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
765765
content {
766766
pod_range = lookup(network_config.value, "pod_range", null)
767767
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
768+
769+
dynamic "network_performance_config" {
770+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
771+
content {
772+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
773+
}
774+
}
768775
}
769776
}
770777

@@ -1091,10 +1098,17 @@ resource "google_container_node_pool" "windows_pools" {
10911098
}
10921099

10931100
dynamic "network_config" {
1094-
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null ? [each.value] : []
1101+
for_each = length(lookup(each.value, "pod_range", "")) > 0 || lookup(each.value, "enable_private_nodes", null) != null || lookup(each.value, "total_egress_bandwidth_tier", null) != null ? [each.value] : []
10951102
content {
10961103
pod_range = lookup(network_config.value, "pod_range", null)
10971104
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
1105+
1106+
dynamic "network_performance_config" {
1107+
for_each = lookup(network_config.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
1108+
content {
1109+
total_egress_bandwidth_tier = lookup(network_config.value, "total_egress_bandwidth_tier", null)
1110+
}
1111+
}
10981112
}
10991113
}
11001114

0 commit comments

Comments
 (0)