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!: Add support for enable_l4_ilb_subsetting flag #896

Merged
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
2 changes: 2 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ resource "google_container_cluster" "primary" {
enabled = pod_security_policy_config.value
}
}

enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
{% endif %}
dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
Expand Down
6 changes: 6 additions & 0 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ variable "enable_pod_security_policy" {
default = false
}

variable "enable_l4_ilb_subsetting" {
type = bool
description = "Enable L4 ILB Subsetting on the cluster"
default = false
}

variable "sandbox_enabled" {
type = bool
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
Expand Down
2 changes: 1 addition & 1 deletion autogen/main/versions.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.49.0, <4.0.0"
version = ">= 3.63.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
credentials = file(var.credentials_path)
region = var.region
}
Expand Down
2 changes: 1 addition & 1 deletion examples/node_pool_update_variant_public_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
credentials = file(var.credentials_path)
region = var.region
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
}

data "google_client_config" "default" {}
Expand Down
2 changes: 1 addition & 1 deletion examples/safer_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
}

data "google_client_config" "default" {}
Expand Down
2 changes: 1 addition & 1 deletion examples/safer_cluster_iap_bastion/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
}

data "google_client_config" "default" {}
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_regional_private_beta/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ provider "google" {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_zonal_with_asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
region = var.region
}

Expand Down
2 changes: 1 addition & 1 deletion examples/workload_metadata_config/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ locals {
}

provider "google-beta" {
version = "~> 3.49.0"
version = "~> 3.63.0"
region = var.region
}

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 @@ -180,6 +180,7 @@ Then perform the following commands on the root folder:
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| 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 |
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| 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 |
| 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 |
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ resource "google_container_cluster" "primary" {
enabled = pod_security_policy_config.value
}
}

enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ variable "enable_pod_security_policy" {
default = false
}

variable "enable_l4_ilb_subsetting" {
type = bool
description = "Enable L4 ILB Subsetting on the cluster"
default = false
}

variable "sandbox_enabled" {
type = bool
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.49.0, <4.0.0"
version = ">= 3.63.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
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 @@ -158,6 +158,7 @@ Then perform the following commands on the root folder:
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| 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 |
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| 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 |
| 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 |
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ resource "google_container_cluster" "primary" {
enabled = pod_security_policy_config.value
}
}

enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ variable "enable_pod_security_policy" {
default = false
}

variable "enable_l4_ilb_subsetting" {
type = bool
description = "Enable L4 ILB Subsetting on the cluster"
default = false
}

variable "sandbox_enabled" {
type = bool
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.49.0, <4.0.0"
version = ">= 3.63.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
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 @@ -173,6 +173,7 @@ Then perform the following commands on the root folder:
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| 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 |
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| 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 |
| 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 |
| 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 |
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ resource "google_container_cluster" "primary" {
enabled = pod_security_policy_config.value
}
}

enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ variable "enable_pod_security_policy" {
default = false
}

variable "enable_l4_ilb_subsetting" {
type = bool
description = "Enable L4 ILB Subsetting on the cluster"
default = false
}

variable "sandbox_enabled" {
type = bool
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.49.0, <4.0.0"
version = ">= 3.63.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
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 @@ -151,6 +151,7 @@ Then perform the following commands on the root folder:
| enable\_binary\_authorization | Enable BinAuthZ Admission controller | `bool` | `false` | no |
| 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 |
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
| 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 |
| 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 |
| 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 |
Expand Down
2 changes: 2 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ resource "google_container_cluster" "primary" {
enabled = pod_security_policy_config.value
}
}

enable_l4_ilb_subsetting = var.enable_l4_ilb_subsetting
dynamic "master_authorized_networks_config" {
for_each = local.master_authorized_networks_config
content {
Expand Down
6 changes: 6 additions & 0 deletions modules/beta-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ variable "enable_pod_security_policy" {
default = false
}

variable "enable_l4_ilb_subsetting" {
type = bool
description = "Enable L4 ILB Subsetting on the cluster"
default = false
}

variable "sandbox_enabled" {
type = bool
description = "(Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it)."
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.49.0, <4.0.0"
version = ">= 3.63.0, <4.0.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
2 changes: 1 addition & 1 deletion test/bundle.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ providers {
source = "hashicorp/google"
}
google-beta = {
version = "~> 3.49.0"
version = "~> 3.63.0"
source = "hashicorp/google-beta"
}
external = {
Expand Down