Skip to content

Commit ed64058

Browse files
authored
feat: promote max_pods_per_node, max_surge, and max_unavailable fields to ga (#1318)
* promote fields to ga * revert network_config
1 parent cff4428 commit ed64058

File tree

8 files changed

+21
-4
lines changed

8 files changed

+21
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ 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 |
256259
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |

autogen/main/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,9 @@ 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 |
221219
{% if beta_cluster %}

autogen/main/cluster.tf.tmpl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,10 @@ resource "google_container_node_pool" "pools" {
610610
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
611611
}
612612

613-
{% if beta_cluster %}
614613
upgrade_settings {
615614
max_surge = lookup(each.value, "max_surge", 1)
616615
max_unavailable = lookup(each.value, "max_unavailable", 0)
617616
}
618-
{% endif %}
619617

620618
node_config {
621619
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ resource "google_container_node_pool" "pools" {
303303
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
304304
}
305305

306+
upgrade_settings {
307+
max_surge = lookup(each.value, "max_surge", 1)
308+
max_unavailable = lookup(each.value, "max_unavailable", 0)
309+
}
306310

307311
node_config {
308312
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ 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 |
290293
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@ resource "google_container_node_pool" "pools" {
407407
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
408408
}
409409

410+
upgrade_settings {
411+
max_surge = lookup(each.value, "max_surge", 1)
412+
max_unavailable = lookup(each.value, "max_unavailable", 0)
413+
}
410414

411415
node_config {
412416
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

modules/private-cluster/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ 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 |
268271
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |

modules/private-cluster/cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ resource "google_container_node_pool" "pools" {
316316
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
317317
}
318318

319+
upgrade_settings {
320+
max_surge = lookup(each.value, "max_surge", 1)
321+
max_unavailable = lookup(each.value, "max_unavailable", 0)
322+
}
319323

320324
node_config {
321325
image_type = lookup(each.value, "image_type", "COS_CONTAINERD")

0 commit comments

Comments
 (0)