ironcore-dev / metal-operator

Kubernetes operator for automating bare metal server discovery and provisioning
Apache License 2.0
7 stars 4 forks source link

Expose BIOS configuration in `Server` type #85

Closed afritzler closed 3 weeks ago

afritzler commented 1 month ago

Summary

We need to extend the Server type by supporting the following BIOS related settings:

The Server type will expose two new fields which will allow the user to specify those settings:

Upon Server reconciliation the current BIOS settings have to be read out via RedFish and put into the Server status. In case a drift is detected, e.g. the .spec.BIOS does not match the .status.BIOS settings, a condition "Restart/Reboot needed" has to be added to the conditions field of the Server status.

An example manifest can be found below:

apiVersion: metal.ironcore.dev/v1alpha1
kind: Server
metadata:
  name: foo
  annotations: 
    metal.ironcore.dev/op: PowerCycle ## set by somebody else
spec:
  bmcRef:
  # -> some BMC of which we know the vendor/family
  bootOrder:
  - name: foo
    priority: 1
    device: "netboot"
  - name: disk
    priority: 100 
    device: "disk (hd0)"
  BIOS: # danger zone!!!
  - version: 1.0.1
    settings:
      foo3: bar3
  - version: 1.0.0
    settings:
      foo: bar
      foo2: bar2
status:
  BIOS:
    version: 1.0.0
    settings: # read first top prio settings
      foo: bar
      foo2: bar2
  condition:
    type: "Reboot needed" # if drift is detected

Tasks:

afritzler commented 1 month ago

Do you guys think .spec.bootOrder[0].type is a good name here? Or should we rather chose medium or deviceType?

stefanhipfel commented 1 month ago

hm I would call it deviceType or simply device.

from Dell:

Use the arrow keys to select a boot device, and use the plus (+) and minus (-) sign keys to move the device down or up in the order.

afritzler commented 1 month ago

Updated the sample spec with device instead of type.