Skip to content

Commit 1f31dd9

Browse files
Fix linting issues
Signed-off-by: Jacob Weinstock <[email protected]>
1 parent a5ace1a commit 1f31dd9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

api/v1beta1/tinkerbellmachine_types.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ type BootOptions struct {
8888
// When this field is set, the controller will create a job.bmc.tinkerbell.org object
8989
// for getting the associated hardware into a CDROM booting state.
9090
// A HardwareRef that contains a spec.BmcRef must be provided.
91+
//
9192
// The format of the ISOURL must be http://$IP:$Port/iso/:macAddress/hook.iso
9293
// The name of the ISO file must have the .iso extension, but the name can be anything.
93-
// The $IP and $Port should generally point to the IP and Port of the Smee server as this is where
94-
// the ISO patching endpoint lives.
95-
// The ":macAddress" is a placeholder for the MAC address of the hardware and should be provided exactly as is: ":macAddress".
94+
// The $IP and $Port should generally point to the IP and Port of the Smee server
95+
// as this is where the ISO patching endpoint lives.
96+
// The ":macAddress" is a placeholder for the MAC address of the hardware and
97+
// should be provided exactly as is: ":macAddress".
9698
// +optional
9799
// +kubebuilder:validation:Format=url
98100
ISOURL string `json:"isoURL,omitempty"`

controller/machine/workflow.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ func (scope *machineReconcileScope) createWorkflow(hw *tinkv1.Hardware) error {
7777
return errISOBootURLRequired
7878
}
7979

80-
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("iso")
8180
u, err := url.Parse(scope.tinkerbellMachine.Spec.BootOptions.ISOURL)
8281
if err != nil {
8382
return fmt.Errorf("boot option isoURL is not parse-able: %w", err)
8483
}
84+
8585
u.Path = strings.Replace(u.Path, ":macAddress", strings.Replace(hw.Spec.Metadata.Instance.ID, ":", "-", 5), 1)
8686
workflow.Spec.BootOptions.ISOURL = u.String()
87+
workflow.Spec.BootOptions.BootMode = tinkv1.BootMode("iso")
8788
}
8889
}
8990

0 commit comments

Comments
 (0)