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: support total_egress_bandwidth_tier #2207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
1 change: 1 addition & 0 deletions autogen/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the accepted values are "TIER_1" and "TIER_UNSPECIFIED". Let's include in the description similar to the other parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check, its not reflected in provider docs

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

| 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 |
| 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 |
| 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 |
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 @@ -886,6 +886,13 @@ resource "google_container_node_pool" "windows_pools" {
{% else %}
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
{% endif %}

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
Copy link
Collaborator

@apeabody apeabody Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would null or "TIER_UNSPECIFIED" be a better default value? (Not that it should be possible to ever use the default value here.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will check, probably null

}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -894,6 +901,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -422,6 +422,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -1066,6 +1073,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -400,6 +400,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -984,6 +991,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -409,6 +409,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -1036,6 +1043,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -387,6 +387,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -954,6 +961,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -402,6 +402,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -1005,6 +1012,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

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 @@ -380,6 +380,7 @@ The node_pools variable takes the following parameters:
| queued_provisioning | Makes nodes obtainable through the ProvisioningRequest API exclusively. | | Optional |
| gpu_sharing_strategy | The type of GPU sharing strategy to enable on the GPU node. Accepted values are: "TIME_SHARING" and "MPS". | | Optional |
| max_shared_clients_per_gpu | The maximum number of containers that can share a GPU. | | Optional |
| total_egress_bandwidth_tier | Specifies the total network bandwidth tier. | | Optional |
| 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 |
| 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 |
| 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 |
Expand Down
14 changes: 14 additions & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,13 @@ resource "google_container_node_pool" "pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down Expand Up @@ -924,6 +931,13 @@ resource "google_container_node_pool" "windows_pools" {
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = var.enable_private_nodes

dynamic "network_performance_config" {
for_each = lookup(each.value, "total_egress_bandwidth_tier", "") != "" ? [1] : []
content {
total_egress_bandwidth_tier = lookup(each.value, "total_egress_bandwidth_tier", "")
}
}
}
}

Expand Down
Loading