Skip to content

Commit 57c366a

Browse files
authored
fix!: properly implement additional_ip_ranges_config (#2451)
Signed-off-by: drfaust92 <[email protected]>
1 parent d30964c commit 57c366a

Some content is hidden

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

51 files changed

+101
-74
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Then perform the following commands on the root folder:
144144
| add\_master\_webhook\_firewall\_rules | Create master\_webhook firewall rules for ports defined in `firewall_inbound_ports` | `bool` | `false` | no |
145145
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
146146
| additional\_ip\_range\_pods | List of _names_ of the additional secondary subnet ip ranges to use for pods | `list(string)` | `[]` | no |
147-
| additional\_pod\_ranges\_config | the configuration for individual additional subnetworks attached to the cluster | `list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))` | `[]` | no |
147+
| additional\_ip\_ranges\_config | the configuration for individual additional subnetworks attached to the cluster | `list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))` | `[]` | no |
148148
| additive\_vpc\_scope\_dns\_domain | This will enable Cloud DNS additive VPC scope. Must provide a domain name that is unique within the VPC. For this to work cluster\_dns = `CLOUD_DNS` and cluster\_dns\_scope = `CLUSTER_SCOPE` must both be set as well. | `string` | `""` | no |
149149
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |
150150
| boot\_disk\_kms\_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool, if not overridden in `node_pools`. This should be of the form projects/[KEY\_PROJECT\_ID]/locations/[LOCATION]/keyRings/[RING\_NAME]/cryptoKeys/[KEY\_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption | `string` | `null` | no |

autogen/main/cluster.tf.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,11 @@ resource "google_container_cluster" "primary" {
541541
pod_range_names = var.additional_ip_range_pods
542542
}
543543
}
544-
dynamic "additional_pod_ranges_config" {
545-
for_each = var.additional_pod_ranges_config
544+
dynamic "additional_ip_ranges_config" {
545+
for_each = var.additional_ip_ranges_config
546546
content {
547-
subnetwork = var.additional_pod_ranges_config.subnetwork
548-
pod_ipv4_range_names = var.additional_pod_ranges_config.pod_ipv4_range_names
547+
subnetwork = var.additional_ip_ranges_config.subnetwork
548+
pod_ipv4_range_names = var.additional_ip_ranges_config.pod_ipv4_range_names
549549
}
550550
}
551551
stack_type = var.stack_type

autogen/main/variables.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ variable "additional_ip_range_pods" {
174174
default = []
175175
}
176176

177-
variable "additional_pod_ranges_config" {
177+
variable "additional_ip_ranges_config" {
178178
type = list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))
179179
description = "the configuration for individual additional subnetworks attached to the cluster"
180180
default = []

cluster.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -411,11 +411,11 @@ resource "google_container_cluster" "primary" {
411411
pod_range_names = var.additional_ip_range_pods
412412
}
413413
}
414-
dynamic "additional_pod_ranges_config" {
415-
for_each = var.additional_pod_ranges_config
414+
dynamic "additional_ip_ranges_config" {
415+
for_each = var.additional_ip_ranges_config
416416
content {
417-
subnetwork = var.additional_pod_ranges_config.subnetwork
418-
pod_ipv4_range_names = var.additional_pod_ranges_config.pod_ipv4_range_names
417+
subnetwork = var.additional_ip_ranges_config.subnetwork
418+
pod_ipv4_range_names = var.additional_ip_ranges_config.pod_ipv4_range_names
419419
}
420420
}
421421
stack_type = var.stack_type

examples/disable_client_cert/core

Whitespace-only changes.

examples/gke_autopilot_cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "gke" {
3636
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-autopilot-cluster"
3737
version = "~> 38.0"
3838

39-
project_id = var.project_id
39+
project_id = var.project_id
4040
name = "${local.cluster_type}-cluster"
4141
location = var.region
4242
network = module.gcp-network.network_self_link

examples/gke_standard_cluster/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module "gke" {
3737
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-standard-cluster"
3838
version = "~> 38.0"
3939

40-
project_id = var.project_id
40+
project_id = var.project_id
4141
name = "${local.cluster_type}-cluster${var.cluster_name_suffix}"
4242
location = var.region
4343
network = var.network
@@ -87,9 +87,9 @@ module "node_pool" {
8787
source = "terraform-google-modules/kubernetes-engine/google//modules/gke-node-pool"
8888
version = "~> 38.0"
8989

90-
project_id = var.project_id
91-
location = var.region
92-
cluster = module.gke.cluster_name
90+
project_id = var.project_id
91+
location = var.region
92+
cluster = module.gke.cluster_name
9393
node_config = {
9494
disk_size_gb = 100
9595
disk_type = "pd-standard"

examples/node_pool/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ module "gke" {
163163
}
164164

165165
node_pools_cgroup_mode = {
166-
all = "CGROUP_MODE_V2"
166+
all = "CGROUP_MODE_V2"
167167
pool-01 = "CGROUP_MODE_V1"
168168
}
169169

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ spec:
3939
additional_ip_range_pods:
4040
name: additional_ip_range_pods
4141
title: Additional Ip Range Pods
42+
additional_ip_ranges_config:
43+
name: additional_ip_ranges_config
44+
title: Additional Ip Ranges Config
4245
additional_pod_ranges_config:
4346
name: additional_pod_ranges_config
4447
title: Additional Pod Ranges Config

metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ spec:
259259
description: List of _names_ of the additional secondary subnet ip ranges to use for pods
260260
varType: list(string)
261261
defaultValue: []
262-
- name: additional_pod_ranges_config
262+
- name: additional_ip_ranges_config
263263
description: the configuration for individual additional subnetworks attached to the cluster
264264
varType: list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))
265265
defaultValue: []

0 commit comments

Comments
 (0)