Skip to content

Commit 0733908

Browse files
feat: enable L4 ILB subsetting support for safer clusters (#2105)
1 parent 303b85d commit 0733908

File tree

8 files changed

+29
-0
lines changed

8 files changed

+29
-0
lines changed

autogen/safer-cluster/main.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ module "gke" {
169169
// Enable cost allocation support
170170
enable_cost_allocation = var.enable_cost_allocation
171171

172+
// Enable L4 ILB subsetting on the cluster
173+
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
174+
172175
// Use of PodSecurityPolicy admission controller
173176
// https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies
174177
enable_pod_security_policy = var.enable_pod_security_policy

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ variable "enable_intranode_visibility" {
391391
default = false
392392
}
393393

394+
variable "enable_l4_ilb_subsetting" {
395+
type = bool
396+
description = "Enable L4 ILB Subsetting on the cluster"
397+
default = false
398+
}
399+
394400
variable "enable_vertical_pod_autoscaling" {
395401
type = bool
396402
description = "Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it"

modules/safer-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ For simplicity, we suggest using `roles/container.admin` and
221221
| 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 |
222222
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
223223
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
224+
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
224225
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
225226
| enable\_pod\_security\_policy | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | `bool` | `false` | no |
226227
| enable\_private\_endpoint | When true, the cluster's private endpoint is used as the cluster endpoint and access through the public endpoint is disabled. When false, either endpoint can be used. This field only applies to private clusters, when enable\_private\_nodes is true | `bool` | `true` | no |

modules/safer-cluster-update-variant/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ module "gke" {
165165
// Enable cost allocation support
166166
enable_cost_allocation = var.enable_cost_allocation
167167

168+
// Enable L4 ILB subsetting on the cluster
169+
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
170+
168171
// Use of PodSecurityPolicy admission controller
169172
// https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies
170173
enable_pod_security_policy = var.enable_pod_security_policy

modules/safer-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ variable "enable_intranode_visibility" {
391391
default = false
392392
}
393393

394+
variable "enable_l4_ilb_subsetting" {
395+
type = bool
396+
description = "Enable L4 ILB Subsetting on the cluster"
397+
default = false
398+
}
399+
394400
variable "enable_vertical_pod_autoscaling" {
395401
type = bool
396402
description = "Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it"

modules/safer-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ For simplicity, we suggest using `roles/container.admin` and
221221
| 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 |
222222
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
223223
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
224+
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
224225
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
225226
| enable\_pod\_security\_policy | enabled - Enable the PodSecurityPolicy controller for this cluster. If enabled, pods must be valid under a PodSecurityPolicy to be created. | `bool` | `false` | no |
226227
| enable\_private\_endpoint | When true, the cluster's private endpoint is used as the cluster endpoint and access through the public endpoint is disabled. When false, either endpoint can be used. This field only applies to private clusters, when enable\_private\_nodes is true | `bool` | `true` | no |

modules/safer-cluster/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ module "gke" {
165165
// Enable cost allocation support
166166
enable_cost_allocation = var.enable_cost_allocation
167167

168+
// Enable L4 ILB subsetting on the cluster
169+
enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
170+
168171
// Use of PodSecurityPolicy admission controller
169172
// https://cloud.google.com/kubernetes-engine/docs/how-to/pod-security-policies
170173
enable_pod_security_policy = var.enable_pod_security_policy

modules/safer-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ variable "enable_intranode_visibility" {
391391
default = false
392392
}
393393

394+
variable "enable_l4_ilb_subsetting" {
395+
type = bool
396+
description = "Enable L4 ILB Subsetting on the cluster"
397+
default = false
398+
}
399+
394400
variable "enable_vertical_pod_autoscaling" {
395401
type = bool
396402
description = "Vertical Pod Autoscaling automatically adjusts the resources of pods controlled by it"

0 commit comments

Comments
 (0)