Skip to content

Commit 09e5aa5

Browse files
committed
promote fields to ga
1 parent 59ca09e commit 09e5aa5

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
@@ -586,26 +586,22 @@ resource "google_container_node_pool" "pools" {
586586
}
587587
}
588588

589-
{% if beta_cluster %}
590589
dynamic "network_config" {
591590
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
592591
content {
593592
pod_range = lookup(network_config.value, "pod_range", null)
594593
}
595594
}
596-
{% endif %}
597595

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

603-
{% if beta_cluster %}
604601
upgrade_settings {
605602
max_surge = lookup(each.value, "max_surge", 1)
606603
max_unavailable = lookup(each.value, "max_unavailable", 0)
607604
}
608-
{% endif %}
609605

610606
node_config {
611607
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
@@ -399,12 +399,22 @@ resource "google_container_node_pool" "pools" {
399399
}
400400
}
401401

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

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

414+
upgrade_settings {
415+
max_surge = lookup(each.value, "max_surge", 1)
416+
max_unavailable = lookup(each.value, "max_unavailable", 0)
417+
}
408418

409419
node_config {
410420
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)