Skip to content

Commit 6a31423

Browse files
committed
Add ilb subsetting for autopilot clusters
1 parent 15380eb commit 6a31423

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
@@ -233,9 +233,9 @@ resource "google_container_cluster" "primary" {
233233
}
234234
}
235235
{% endif %}
236+
{% endif %}
236237

237238
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
238-
{% endif %}
239239
{% if beta_cluster %}
240240
enable_fqdn_network_policy = var.enable_fqdn_network_policy
241241
{% endif %}

autogen/main/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,12 +802,12 @@ variable "config_connector" {
802802
default = false
803803
}
804804

805+
{% endif %}
805806
variable "enable_l4_ilb_subsetting" {
806807
type = bool
807808
description = "Enable L4 ILB Subsetting on the cluster"
808809
default = false
809810
}
810-
{% endif %}
811811
{% if beta_cluster %}
812812
{% if autopilot_cluster != true %}
813813

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)