Skip to content

Commit a5cdd82

Browse files
ddevadathyder
authored andcommitted
feat: Ability to define bursting for instance and instance-pool
Added the ability to define burstability for worker pool mode instance and instance-pool. Signed-off-by: Deepak Devadathan <[email protected]>
1 parent 2c7037a commit a5cdd82

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

examples/workers/vars-workers-instance.auto.tfvars

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ worker_pools = {
1414
"vnic-display-name" = {},
1515
},
1616
},
17+
oke-vm-instance-burst = {
18+
description = "Self-managed Instance With Bursting",
19+
mode = "instance",
20+
size = 1,
21+
burst = "BASELINE_1_8", # Valid values BASELINE_1_8,BASELINE_1_2
22+
},
1723
}

examples/workers/vars-workers-instancepool.auto.tfvars

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@ worker_pools = {
1414
"vnic-display-name" = {},
1515
},
1616
},
17+
oke-vm-instance-pool-burst = {
18+
description = "Self-managed Instance Pool With Bursting",
19+
mode = "instance-pool",
20+
size = 1,
21+
burst = "BASELINE_1_8", # Valid values BASELINE_1_8,BASELINE_1_2
22+
}
1723
}

modules/workers/instance.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ resource "oci_core_instance" "workers" {
1515
dynamic "shape_config" {
1616
for_each = length(regexall("Flex", each.value.shape)) > 0 ? [1] : []
1717
content {
18-
ocpus = each.value.ocpus
18+
baseline_ocpu_utilization = lookup(each.value, "burst", "BASELINE_1_1")
19+
ocpus = each.value.ocpus
1920
memory_in_gbs = ( # If > 64GB memory/core, correct input to exactly 64GB memory/core
2021
(each.value.memory / each.value.ocpus) > 64 ? each.value.ocpus * 64 : each.value.memory
2122
)

modules/workers/instanceconfig.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ resource "oci_core_instance_configuration" "workers" {
7676
dynamic "shape_config" {
7777
for_each = length(regexall("Flex", each.value.shape)) > 0 ? [1] : []
7878
content {
79-
ocpus = each.value.ocpus
79+
baseline_ocpu_utilization = lookup(each.value, "burst", "BASELINE_1_1")
80+
ocpus = each.value.ocpus
8081
memory_in_gbs = ( # If > 64GB memory/core, correct input to exactly 64GB memory/core
8182
(each.value.memory / each.value.ocpus) > 64 ? each.value.ocpus * 64 : each.value.memory
8283
)

0 commit comments

Comments
 (0)