Skip to content

Commit d80316b

Browse files
authored
feat: add support for max_run_duration (#2374)
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
1 parent 520979b commit d80316b

File tree

16 files changed

+35
-0
lines changed

16 files changed

+35
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ The node_pools variable takes the following parameters:
396396
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
397397
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |
398398
| local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional |
399+
| max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional |
399400

400401
## windows_node_pools variable
401402

autogen/main/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ The node_pools variable takes the following parameters:
283283
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
284284
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |
285285
| local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional |
286+
| max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional |
286287

287288
## windows_node_pools variable
288289

autogen/main/cluster.tf.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ resource "google_container_cluster" "primary" {
675675
}
676676

677677
local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null)
678+
max_run_duration = lookup(var.node_pools[0], "max_run_duration", null)
678679
}
679680
}
680681
{% endif %}
@@ -833,6 +834,7 @@ locals {
833834
"reservation_affinity_values",
834835
"secondary_boot_disk",
835836
"local_ssd_encryption_mode",
837+
"max_run_duration",
836838
]
837839
}
838840

@@ -1265,6 +1267,7 @@ resource "google_container_node_pool" "windows_pools" {
12651267
}
12661268

12671269
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1270+
max_run_duration = lookup(each.value, "max_run_duration", null)
12681271
}
12691272

12701273
lifecycle {

cluster.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ resource "google_container_cluster" "primary" {
525525
}
526526

527527
local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null)
528+
max_run_duration = lookup(var.node_pools[0], "max_run_duration", null)
528529
}
529530
}
530531

@@ -952,6 +953,7 @@ resource "google_container_node_pool" "pools" {
952953
}
953954

954955
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
956+
max_run_duration = lookup(each.value, "max_run_duration", null)
955957
}
956958

957959
lifecycle {
@@ -1273,6 +1275,7 @@ resource "google_container_node_pool" "windows_pools" {
12731275
}
12741276

12751277
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1278+
max_run_duration = lookup(each.value, "max_run_duration", null)
12761279
}
12771280

12781281
lifecycle {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ The node_pools variable takes the following parameters:
450450
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
451451
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |
452452
| local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional |
453+
| max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional |
453454

454455
## windows_node_pools variable
455456

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ resource "google_container_cluster" "primary" {
570570
}
571571

572572
local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null)
573+
max_run_duration = lookup(var.node_pools[0], "max_run_duration", null)
573574
}
574575
}
575576

@@ -712,6 +713,7 @@ locals {
712713
"reservation_affinity_values",
713714
"secondary_boot_disk",
714715
"local_ssd_encryption_mode",
716+
"max_run_duration",
715717
]
716718
}
717719

@@ -1115,6 +1117,7 @@ resource "google_container_node_pool" "pools" {
11151117
}
11161118

11171119
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1120+
max_run_duration = lookup(each.value, "max_run_duration", null)
11181121
}
11191122

11201123
lifecycle {
@@ -1450,6 +1453,7 @@ resource "google_container_node_pool" "windows_pools" {
14501453
}
14511454

14521455
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1456+
max_run_duration = lookup(each.value, "max_run_duration", null)
14531457
}
14541458

14551459
lifecycle {

modules/beta-private-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ The node_pools variable takes the following parameters:
428428
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
429429
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |
430430
| local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional |
431+
| max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional |
431432

432433
## windows_node_pools variable
433434

modules/beta-private-cluster/cluster.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ resource "google_container_cluster" "primary" {
570570
}
571571

572572
local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null)
573+
max_run_duration = lookup(var.node_pools[0], "max_run_duration", null)
573574
}
574575
}
575576

@@ -1033,6 +1034,7 @@ resource "google_container_node_pool" "pools" {
10331034
}
10341035

10351036
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1037+
max_run_duration = lookup(each.value, "max_run_duration", null)
10361038
}
10371039

10381040
lifecycle {
@@ -1367,6 +1369,7 @@ resource "google_container_node_pool" "windows_pools" {
13671369
}
13681370

13691371
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1372+
max_run_duration = lookup(each.value, "max_run_duration", null)
13701373
}
13711374

13721375
lifecycle {

modules/beta-public-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ The node_pools variable takes the following parameters:
437437
| reservation_affinity_key | The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value. | | Optional |
438438
| reservation_affinity_values | The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name". This should be passed as comma separated string. | | Optional |
439439
| local_ssd_encryption_mode | specifies the method used for encrypting the local SSDs attached to the node. Valid values are: "STANDARD_ENCRYPTION" and "EPHEMERAL_KEY_ENCRYPTION" | | Optional |
440+
| max_run_duration | The runtime of each node in the node pool in seconds, terminated by 's'. Example: "3600s". | null | Optional |
440441

441442
## windows_node_pools variable
442443

modules/beta-public-cluster-update-variant/cluster.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ resource "google_container_cluster" "primary" {
570570
}
571571

572572
local_ssd_encryption_mode = lookup(var.node_pools[0], "local_ssd_encryption_mode", null)
573+
max_run_duration = lookup(var.node_pools[0], "max_run_duration", null)
573574
}
574575
}
575576

@@ -690,6 +691,7 @@ locals {
690691
"reservation_affinity_values",
691692
"secondary_boot_disk",
692693
"local_ssd_encryption_mode",
694+
"max_run_duration",
693695
]
694696
}
695697

@@ -1093,6 +1095,7 @@ resource "google_container_node_pool" "pools" {
10931095
}
10941096

10951097
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1098+
max_run_duration = lookup(each.value, "max_run_duration", null)
10961099
}
10971100

10981101
lifecycle {
@@ -1428,6 +1431,7 @@ resource "google_container_node_pool" "windows_pools" {
14281431
}
14291432

14301433
local_ssd_encryption_mode = lookup(each.value, "local_ssd_encryption_mode", null)
1434+
max_run_duration = lookup(each.value, "max_run_duration", null)
14311435
}
14321436

14331437
lifecycle {

0 commit comments

Comments
 (0)