Skip to content

Commit 0df9c2a

Browse files
authored
OK-1526 Set io_boost to true if not provided (#26)
* OK-1526 Set `io_boost` to `true` if not provided * update docs
1 parent beed3e9 commit 0df9c2a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

builder/orka/config.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Config struct {
5757
NoDeleteVM bool `mapstructure:"no_delete_vm"`
5858

5959
// Enable Boost IO Performance https://orkadocs.macstadium.com/docs/boost-io-performance
60-
OrkaVMBuilderEnableIOBoost bool `mapstructure:"orka_enable_io_boost"`
60+
OrkaVMBuilderEnableIOBoost *bool `mapstructure:"orka_enable_io_boost"`
6161

6262
// Enable Orka IP Mapping for exposed IP networking
6363
EnableOrkaNodeIPMapping bool `mapstructure:"enable_orka_node_ip_mapping"`
@@ -139,6 +139,11 @@ func (c *Config) Prepare(raws ...interface{}) ([]string, error) {
139139
c.OrkaVMCPUCore = 3
140140
}
141141

142+
if c.OrkaVMBuilderEnableIOBoost == nil {
143+
var defaultIOBoostValue = true
144+
c.OrkaVMBuilderEnableIOBoost = &defaultIOBoostValue
145+
}
146+
142147
if es := c.CommConfig.Prepare(nil); len(es) > 0 {
143148
errs = packer.MultiErrorAppend(errs, es...)
144149
}

builder/orka/step_orka_create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (s *stepOrkaCreate) Run(ctx context.Context, state multistep.StateBag) mult
155155
OrkaImage: config.OrkaVMBuilderName,
156156
OrkaCPUCore: config.OrkaVMCPUCore,
157157
VCPUCount: config.OrkaVMCPUCore,
158-
OrkaEnableIOBoost: config.OrkaVMBuilderEnableIOBoost,
158+
OrkaEnableIOBoost: *config.OrkaVMBuilderEnableIOBoost,
159159
}
160160
vmCreateConfigRequestDataJSON, _ := json.Marshal(vmCreateConfigRequestData)
161161
vmCreateConfigRequest, _ := http.NewRequest(

docs/builders/config.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build {
7777

7878
* `orka_vm_builder_prefix` _(string)_ (optional): If orka_vm_builder_name is not passed in, you can add prefix to the virtual machine name that the plugin appends a timestamp to. Defaults to packer.
7979

80-
* `orka_enable_io_boost` _(bool)_ (optional): Enable [Boost IO Performance](https://orkadocs.macstadium.com/docs/boost-io-performance), off by default
80+
- `orka_enable_io_boost` _(bool)_ (optional): Enable or Disable [Boost IO Performance](https://orkadocs.macstadium.com/docs/boost-io-performance), on by default
8181

8282
* `orka_vm_cpu_core` _(int)_ (optional): Number of cpu cores to use with the virtual machine.
8383

0 commit comments

Comments
 (0)