File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ func (scope *machineReconcileScope) createWorkflow(hw *tinkv1.Hardware) error {
54
54
TemplateRef : scope .tinkerbellMachine .Name ,
55
55
HardwareRef : hw .Name ,
56
56
HardwareMap : map [string ]string {"device_1" : hw .Spec .Metadata .Instance .ID },
57
+ BootOptions : tinkv1.BootOptions {
58
+ ToggleAllowNetboot : true ,
59
+ },
57
60
},
58
61
}
59
62
@@ -63,11 +66,12 @@ func (scope *machineReconcileScope) createWorkflow(hw *tinkv1.Hardware) error {
63
66
switch scope .tinkerbellMachine .Spec .BootOptions .BootMode {
64
67
case v1beta1 .BootMode ("netboot" ):
65
68
workflow .Spec .BootOptions .BootMode = tinkv1 .BootMode ("netboot" )
66
- workflow .Spec .BootOptions .ToggleAllowNetboot = true
67
69
case v1beta1 .BootMode ("iso" ):
70
+ if scope .tinkerbellMachine .Spec .BootOptions .ISOURL == "" {
71
+ return fmt .Errorf ("iso boot mode requires an isoURL" )
72
+ }
68
73
workflow .Spec .BootOptions .BootMode = tinkv1 .BootMode ("iso" )
69
74
workflow .Spec .BootOptions .ISOURL = scope .tinkerbellMachine .Spec .BootOptions .ISOURL
70
- workflow .Spec .BootOptions .ToggleAllowNetboot = true
71
75
}
72
76
}
73
77
You can’t perform that action at this time.
0 commit comments