Skip to content

Commit 52f29bb

Browse files
Support the legacy iso boot mode:
This is needed for backward compatibility with Chart <= 0.6.2 Signed-off-by: Jacob Weinstock <[email protected]>
1 parent afe2024 commit 52f29bb

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

api/v1beta1/tinkerbellmachine_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ type BootOptions struct {
100100
ISOURL string `json:"isoURL,omitempty"`
101101

102102
// BootMode is the type of booting that will be done.
103-
// Must be one of "none", "netboot", or "isoboot".
103+
// Must be one of "none", "netboot", "iso", or "isoboot".
104104
// +optional
105-
// +kubebuilder:validation:Enum=none;netboot;isoboot
105+
// +kubebuilder:validation:Enum=none;netboot;iso;isoboot
106106
BootMode BootMode `json:"bootMode,omitempty"`
107107
}
108108

config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachines.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ spec:
6868
bootMode:
6969
description: |-
7070
BootMode is the type of booting that will be done.
71-
Must be one of "none", "netboot", or "isoboot".
71+
Must be one of "none", "netboot", "iso", or "isoboot".
7272
enum:
7373
- none
7474
- netboot
75+
- iso
7576
- isoboot
7677
type: string
7778
isoURL:

config/crd/bases/infrastructure.cluster.x-k8s.io_tinkerbellmachinetemplates.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ spec:
5858
bootMode:
5959
description: |-
6060
BootMode is the type of booting that will be done.
61-
Must be one of "none", "netboot", or "isoboot".
61+
Must be one of "none", "netboot", "iso", or "isoboot".
6262
enum:
6363
- none
6464
- netboot
65+
- iso
6566
- isoboot
6667
type: string
6768
isoURL:

controller/machine/workflow.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (scope *machineReconcileScope) createWorkflow(hw *tinkv1.Hardware) error {
7575
switch scope.tinkerbellMachine.Spec.BootOptions.BootMode {
7676
case v1beta1.BootMode("netboot"):
7777
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("netboot")
78-
case v1beta1.BootMode("isoboot"):
78+
case v1beta1.BootMode("iso"), v1beta1.BootMode("isoboot"):
7979
if scope.tinkerbellMachine.Spec.BootOptions.ISOURL == "" {
8080
return errISOBootURLRequired
8181
}
@@ -89,7 +89,7 @@ func (scope *machineReconcileScope) createWorkflow(hw *tinkv1.Hardware) error {
8989
u.Path = path.Join(urlPath, strings.Replace(hw.Spec.Metadata.Instance.ID, ":", "-", 5), file)
9090

9191
workflow.Spec.BootOptions.ISOURL = u.String()
92-
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("isoboot")
92+
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode(scope.tinkerbellMachine.Spec.BootOptions.BootMode)
9393
}
9494
}
9595

0 commit comments

Comments
 (0)