Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions controller/machine/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
TemplateRef: scope.tinkerbellMachine.Name,
HardwareRef: hw.Name,
HardwareMap: map[string]string{"device_1": hw.Spec.Metadata.Instance.ID},
BootOptions: tinkv1.BootOptions{
ToggleAllowNetboot: true,
},
},
}

Expand All @@ -63,11 +66,12 @@
switch scope.tinkerbellMachine.Spec.BootOptions.BootMode {
case v1beta1.BootMode("netboot"):
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("netboot")
workflow.Spec.BootOptions.ToggleAllowNetboot = true
case v1beta1.BootMode("iso"):
if scope.tinkerbellMachine.Spec.BootOptions.ISOURL == "" {
return fmt.Errorf("iso boot mode requires an isoURL")

Check failure on line 71 in controller/machine/workflow.go

View workflow job for this annotation

GitHub Actions / Validate lint

do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"iso boot mode requires an isoURL\")" (err113)
}
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("iso")

Check failure on line 73 in controller/machine/workflow.go

View workflow job for this annotation

GitHub Actions / Validate lint

assignments should only be cuddled with other assignments (wsl)
workflow.Spec.BootOptions.ISOURL = scope.tinkerbellMachine.Spec.BootOptions.ISOURL
workflow.Spec.BootOptions.ToggleAllowNetboot = true
}
}

Expand Down
Loading