Skip to content

Commit c48dc6e

Browse files
kliu47apeabody
andauthored
feat: Add enable_l4_ilb_subsetting for autopilot clusters (#1969)
Co-authored-by: Andrew Peabody <[email protected]>
1 parent e7b20cd commit c48dc6e

File tree

9 files changed

+19
-2
lines changed

9 files changed

+19
-2
lines changed

autogen/main/cluster.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ resource "google_container_cluster" "primary" {
235235
}
236236
}
237237
{% endif %}
238+
{% endif %}
238239

239240
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
240-
{% endif %}
241241
{% if beta_cluster %}
242242
enable_fqdn_network_policy = var.enable_fqdn_network_policy
243243
{% endif %}

autogen/main/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,12 @@ variable "config_connector" {
810810
default = false
811811
}
812812

813+
{% endif %}
813814
variable "enable_l4_ilb_subsetting" {
814815
type = bool
815816
description = "Enable L4 ILB Subsetting on the cluster"
816817
default = false
817818
}
818-
{% endif %}
819819
{% if beta_cluster %}
820820
{% if autopilot_cluster != true %}
821821

examples/simple_autopilot_public/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ module "gke" {
4848
enable_vertical_pod_autoscaling = true
4949
network_tags = [local.cluster_type]
5050
deletion_protection = false
51+
enable_l4_ilb_subsetting = true
5152
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Then perform the following commands on the root folder:
9191
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
9292
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
9393
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
94+
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
9495
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
9596
| enable\_private\_endpoint | Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
9697
| enable\_private\_nodes | Whether nodes have internal IP addresses only | `bool` | `false` | no |

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ resource "google_container_cluster" "primary" {
8484
vertical_pod_autoscaling {
8585
enabled = var.enable_vertical_pod_autoscaling
8686
}
87+
88+
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
8789
enable_fqdn_network_policy = var.enable_fqdn_network_policy
8890
enable_autopilot = true
8991
dynamic "master_authorized_networks_config" {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ variable "timeouts" {
456456
}
457457
}
458458

459+
variable "enable_l4_ilb_subsetting" {
460+
type = bool
461+
description = "Enable L4 ILB Subsetting on the cluster"
462+
default = false
463+
}
459464
variable "allow_net_admin" {
460465
description = "(Optional) Enable NET_ADMIN for the cluster."
461466
type = bool

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Then perform the following commands on the root folder:
8484
| enable\_confidential\_nodes | An optional flag to enable confidential node config. | `bool` | `false` | no |
8585
| enable\_cost\_allocation | Enables Cost Allocation Feature and the cluster name and namespace of your GKE workloads appear in the labels field of the billing export to BigQuery | `bool` | `false` | no |
8686
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
87+
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
8788
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
8889
| enable\_resource\_consumption\_export | Whether to enable resource consumption metering on this cluster. When enabled, a table will be created in the resource export BigQuery dataset to store resource consumption data. The resulting table can be joined with the resource usage table or with BigQuery billing export. | `bool` | `true` | no |
8990
| enable\_tpu | Enable Cloud TPU resources in the cluster. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ resource "google_container_cluster" "primary" {
8484
vertical_pod_autoscaling {
8585
enabled = var.enable_vertical_pod_autoscaling
8686
}
87+
88+
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
8789
enable_fqdn_network_policy = var.enable_fqdn_network_policy
8890
enable_autopilot = true
8991
dynamic "master_authorized_networks_config" {

modules/beta-autopilot-public-cluster/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@ variable "timeouts" {
426426
}
427427
}
428428

429+
variable "enable_l4_ilb_subsetting" {
430+
type = bool
431+
description = "Enable L4 ILB Subsetting on the cluster"
432+
default = false
433+
}
429434
variable "allow_net_admin" {
430435
description = "(Optional) Enable NET_ADMIN for the cluster."
431436
type = bool

0 commit comments

Comments
 (0)