Skip to content

Commit 60e9360

Browse files
committed
promote fields to ga
1 parent 487f33e commit 60e9360

File tree

8 files changed

+42
-8
lines changed

8 files changed

+42
-8
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,12 @@ The node_pools variable takes the following parameters:
251251
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
252252
| min_cpu_platform | Minimum CPU platform to be used by the nodes in the pool. The nodes may be scheduled on the specified or newer CPU platform. | " " | Optional |
253253
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
254+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
255+
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
256+
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional |
254257
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
255258
| name | The name of the node pool | | Required |
259+
| pod_range | The ID of the secondary range for pod IPs. | | Optional |
256260
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
257261
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
258262
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |

autogen/main/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,16 +211,12 @@ The node_pools variable takes the following parameters:
211211
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
212212
| min_cpu_platform | Minimum CPU platform to be used by the nodes in the pool. The nodes may be scheduled on the specified or newer CPU platform. | " " | Optional |
213213
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
214-
{% if beta_cluster %}
215214
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
216215
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
217216
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional |
218-
{% endif %}
219217
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
220218
| name | The name of the node pool | | Required |
221-
{% if beta_cluster %}
222219
| pod_range | The ID of the secondary range for pod IPs. | | Optional |
223-
{% endif %}
224220
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
225221
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
226222
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,26 +588,22 @@ resource "google_container_node_pool" "pools" {
588588
}
589589
}
590590

591-
{% if beta_cluster %}
592591
dynamic "network_config" {
593592
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
594593
content {
595594
pod_range = lookup(network_config.value, "pod_range", null)
596595
}
597596
}
598-
{% endif %}
599597

600598
management {
601599
auto_repair = lookup(each.value, "auto_repair", true)
602600
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
603601
}
604602

605-
{% if beta_cluster %}
606603
upgrade_settings {
607604
max_surge = lookup(each.value, "max_surge", 1)
608605
max_unavailable = lookup(each.value, "max_unavailable", 0)
609606
}
610-
{% endif %}
611607

612608
node_config {
613609
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

cluster.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,22 @@ resource "google_container_node_pool" "pools" {
297297
}
298298
}
299299

300+
dynamic "network_config" {
301+
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
302+
content {
303+
pod_range = lookup(network_config.value, "pod_range", null)
304+
}
305+
}
300306

301307
management {
302308
auto_repair = lookup(each.value, "auto_repair", true)
303309
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
304310
}
305311

312+
upgrade_settings {
313+
max_surge = lookup(each.value, "max_surge", 1)
314+
max_unavailable = lookup(each.value, "max_unavailable", 0)
315+
}
306316

307317
node_config {
308318
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,12 @@ The node_pools variable takes the following parameters:
285285
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
286286
| min_cpu_platform | Minimum CPU platform to be used by the nodes in the pool. The nodes may be scheduled on the specified or newer CPU platform. | " " | Optional |
287287
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
288+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
289+
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
290+
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional |
288291
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
289292
| name | The name of the node pool | | Required |
293+
| pod_range | The ID of the secondary range for pod IPs. | | Optional |
290294
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
291295
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
292296
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |

modules/private-cluster-update-variant/cluster.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,22 @@ resource "google_container_node_pool" "pools" {
401401
}
402402
}
403403

404+
dynamic "network_config" {
405+
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
406+
content {
407+
pod_range = lookup(network_config.value, "pod_range", null)
408+
}
409+
}
404410

405411
management {
406412
auto_repair = lookup(each.value, "auto_repair", true)
407413
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
408414
}
409415

416+
upgrade_settings {
417+
max_surge = lookup(each.value, "max_surge", 1)
418+
max_unavailable = lookup(each.value, "max_unavailable", 0)
419+
}
410420

411421
node_config {
412422
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

modules/private-cluster/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,12 @@ The node_pools variable takes the following parameters:
263263
| machine_type | The name of a Google Compute Engine machine type | e2-medium | Optional |
264264
| min_cpu_platform | Minimum CPU platform to be used by the nodes in the pool. The nodes may be scheduled on the specified or newer CPU platform. | " " | Optional |
265265
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
266+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
267+
| max_surge | The number of additional nodes that can be added to the node pool during an upgrade. Increasing max_surge raises the number of nodes that can be upgraded simultaneously. Can be set to 0 or greater. | 1 | Optional |
268+
| max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional |
266269
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
267270
| name | The name of the node pool | | Required |
271+
| pod_range | The ID of the secondary range for pod IPs. | | Optional |
268272
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
269273
| node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional |
270274
| node_metadata | Options to expose the node metadata to the workload running on the node | | Optional |

modules/private-cluster/cluster.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,22 @@ resource "google_container_node_pool" "pools" {
310310
}
311311
}
312312

313+
dynamic "network_config" {
314+
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
315+
content {
316+
pod_range = lookup(network_config.value, "pod_range", null)
317+
}
318+
}
313319

314320
management {
315321
auto_repair = lookup(each.value, "auto_repair", true)
316322
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
317323
}
318324

325+
upgrade_settings {
326+
max_surge = lookup(each.value, "max_surge", 1)
327+
max_unavailable = lookup(each.value, "max_unavailable", 0)
328+
}
319329

320330
node_config {
321331
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

0 commit comments

Comments
 (0)