From b12b016b8a948bc6faf562581bf82797bdad6ace Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Wed, 23 Oct 2024 10:21:01 -0600 Subject: [PATCH] Add disabling of DHCP per interface: Adds flexibility on a per hardware basis that already exists in Smee at a global level. Signed-off-by: Jacob Weinstock --- api/v1alpha1/hardware_types.go | 4 ++++ config/crd/bases/tinkerbell.org_hardware.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/v1alpha1/hardware_types.go b/api/v1alpha1/hardware_types.go index 5f4cf0b92..c78f6e6f8 100644 --- a/api/v1alpha1/hardware_types.go +++ b/api/v1alpha1/hardware_types.go @@ -87,6 +87,10 @@ type Interface struct { //+optional DHCP *DHCP `json:"dhcp,omitempty"` + + // DisableDHCP disables DHCP for this interface. + // +kubebuilder:default=false + DisableDHCP bool `json:"disableDhcp,omitempty"` } // Netboot configuration. diff --git a/config/crd/bases/tinkerbell.org_hardware.yaml b/config/crd/bases/tinkerbell.org_hardware.yaml index fa3b35472..b17767333 100644 --- a/config/crd/bases/tinkerbell.org_hardware.yaml +++ b/config/crd/bases/tinkerbell.org_hardware.yaml @@ -124,6 +124,10 @@ spec: pattern: ^(([0-9][0-9]{0,2}|[1-3][0-9][0-9][0-9]|40([0-8][0-9]|9[0-6]))(,[1-9][0-9]{0,2}|[1-3][0-9][0-9][0-9]|40([0-8][0-9]|9[0-6]))*)$ type: string type: object + disableDhcp: + default: false + description: DisableDHCP disables DHCP for this interface. + type: boolean netboot: description: Netboot configuration. properties: