Skip to content

Commit 1b69e34

Browse files
authored
feat: add support for cluster level total_egress_bandwidth_tier (#2394)
Signed-off-by: drfaust92 <[email protected]>
1 parent 19a0929 commit 1b69e34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+194
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ Then perform the following commands on the root folder:
268268
| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | `map(list(string))` | `{}` | no |
269269
| subnetwork | The subnetwork to host the cluster in (required) | `string` | n/a | yes |
270270
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
271+
| total\_egress\_bandwidth\_tier | Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`. | `string` | `null` | no |
271272
| upstream\_nameservers | If specified, the values replace the nameservers taken by default from the node’s /etc/resolv.conf | `list(string)` | `[]` | no |
272273
| windows\_node\_pools | List of maps containing Windows node pools | `list(map(string))` | `[]` | no |
273274
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | `list(string)` | `[]` | no |

autogen/main/cluster.tf.tmpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ resource "google_container_cluster" "primary" {
237237
{% if autopilot_cluster != true %}
238238

239239
dynamic "identity_service_config" {
240-
for_each = var.enable_identity_service !=null ? [var.enable_identity_service] : []
240+
for_each = var.enable_identity_service != null ? [var.enable_identity_service] : []
241241
content {
242242
enabled = identity_service_config.value
243243
}
@@ -267,6 +267,13 @@ resource "google_container_cluster" "primary" {
267267

268268
in_transit_encryption_config = var.in_transit_encryption_config
269269

270+
dynamic "network_performance_config" {
271+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
272+
content {
273+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
274+
}
275+
}
276+
270277
dynamic "secret_manager_config" {
271278
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
272279
content {

autogen/main/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ variable "in_transit_encryption_config" {
710710
default = null
711711
}
712712

713+
variable "total_egress_bandwidth_tier" {
714+
type = string
715+
description = "Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`."
716+
default = null
717+
}
718+
713719
variable "security_posture_mode" {
714720
description = "Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`."
715721
type = string

cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ resource "google_container_cluster" "primary" {
206206

207207
in_transit_encryption_config = var.in_transit_encryption_config
208208

209+
dynamic "network_performance_config" {
210+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
211+
content {
212+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
213+
}
214+
}
215+
209216
dynamic "secret_manager_config" {
210217
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
211218
content {

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ spec:
411411
timeouts:
412412
name: timeouts
413413
title: Timeouts
414+
total_egress_bandwidth_tier:
415+
name: total_egress_bandwidth_tier
416+
title: Total Egress Bandwidth Tier
414417
upstream_nameservers:
415418
name: upstream_nameservers
416419
title: Upstream Nameservers

metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,9 @@ spec:
558558
- name: in_transit_encryption_config
559559
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
560560
varType: string
561+
- name: total_egress_bandwidth_tier
562+
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
563+
varType: string
561564
- name: security_posture_mode
562565
description: Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`.
563566
varType: string

modules/beta-autopilot-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ Then perform the following commands on the root folder:
163163
| stateful\_ha | Whether the Stateful HA Addon is enabled for this cluster. | `bool` | `false` | no |
164164
| subnetwork | The subnetwork to host the cluster in (required) | `string` | n/a | yes |
165165
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
166+
| total\_egress\_bandwidth\_tier | Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`. | `string` | `null` | no |
166167
| workload\_config\_audit\_mode | (beta) Sets which mode of auditing should be used for the cluster's workloads. Accepted values are DISABLED, BASIC. | `string` | `"DISABLED"` | no |
167168
| workload\_vulnerability\_mode | (beta) Sets which mode to use for Protect workload vulnerability scanning feature. Accepted values are DISABLED, BASIC. | `string` | `""` | no |
168169
| zones | The zones to host the cluster in (optional if regional cluster / required if zonal) | `list(string)` | `[]` | no |

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ resource "google_container_cluster" "primary" {
126126

127127
in_transit_encryption_config = var.in_transit_encryption_config
128128

129+
dynamic "network_performance_config" {
130+
for_each = var.total_egress_bandwidth_tier != null ? [1] : []
131+
content {
132+
total_egress_bandwidth_tier = var.total_egress_bandwidth_tier
133+
}
134+
}
135+
129136
dynamic "secret_manager_config" {
130137
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
131138
content {

modules/beta-autopilot-private-cluster/metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ spec:
310310
timeouts:
311311
name: timeouts
312312
title: Timeouts
313+
total_egress_bandwidth_tier:
314+
name: total_egress_bandwidth_tier
315+
title: Total Egress Bandwidth Tier
313316
workload_config_audit_mode:
314317
name: workload_config_audit_mode
315318
title: Workload Config Audit Mode

modules/beta-autopilot-private-cluster/metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ spec:
387387
- name: in_transit_encryption_config
388388
description: Defines the config of in-transit encryption. Valid values are `IN_TRANSIT_ENCRYPTION_DISABLED` and `IN_TRANSIT_ENCRYPTION_INTER_NODE_TRANSPARENT`.
389389
varType: string
390+
- name: total_egress_bandwidth_tier
391+
description: Specifies the total network bandwidth tier for NodePools in the cluster. Valid values are `TIER_UNSPECIFIED` and `TIER_1`. Defaults to `TIER_UNSPECIFIED`.
392+
varType: string
390393
- name: security_posture_mode
391394
description: Security posture mode. Accepted values are `DISABLED` and `BASIC`. Defaults to `DISABLED`.
392395
varType: string

0 commit comments

Comments
 (0)