From ea3bf8ee020e36098fb201d3fc6e70b765fed2a4 Mon Sep 17 00:00:00 2001 From: Sven Rosenzweig Date: Thu, 6 Aug 2026 14:15:00 +0200 Subject: [PATCH] Prepare Multi Provider Setup The network-operator currently requires a single provider to be selected at startup via the --provider flag. Every controller receives the same ProviderFunc and calls it unconditionally. The goal is to move provider selection from a startup flag to the Device resource, so a single operator deployment can manage devices running different operating systems. Therefore, a new field `provider` is introduced. After migration this field will become required, once rolled out and introduced everywhere. Provider flag will be removed. Signed-off-by: Sven Rosenzweig --- api/core/v1alpha1/device_types.go | 5 +++++ .../templates/crd/devices.networking.metal.ironcore.dev.yaml | 4 ++++ config/crd/bases/networking.metal.ironcore.dev_devices.yaml | 4 ++++ docs/api-reference/index.md | 1 + 4 files changed, 14 insertions(+) diff --git a/api/core/v1alpha1/device_types.go b/api/core/v1alpha1/device_types.go index a9a7e6cb6..b8c5c5ae3 100644 --- a/api/core/v1alpha1/device_types.go +++ b/api/core/v1alpha1/device_types.go @@ -24,6 +24,11 @@ type DeviceSpec struct { // +required Endpoint Endpoint `json:"endpoint"` + // Provider is the name of the provider plugin which is responsible for reconciling the CRD connected to the device + // +optional + // +immutable + Provider string `json:"provider,omitempty"` + // Provisioning is an optional configuration for the device provisioning process. // It can be used to provide initial configuration templates or scripts that are applied during the device provisioning. // +optional diff --git a/charts/network-operator/templates/crd/devices.networking.metal.ironcore.dev.yaml b/charts/network-operator/templates/crd/devices.networking.metal.ironcore.dev.yaml index 16aef9365..4a5e46f87 100644 --- a/charts/network-operator/templates/crd/devices.networking.metal.ironcore.dev.yaml +++ b/charts/network-operator/templates/crd/devices.networking.metal.ironcore.dev.yaml @@ -194,6 +194,10 @@ spec: description: Paused can be used to prevent controllers from processing the Device and its associated objects. type: boolean + provider: + description: Provider is the name of the provider plugin which is + responsible for reconciling the CRD connected to the device + type: string provisioning: description: |- Provisioning is an optional configuration for the device provisioning process. diff --git a/config/crd/bases/networking.metal.ironcore.dev_devices.yaml b/config/crd/bases/networking.metal.ironcore.dev_devices.yaml index 67379c014..cadd01f42 100644 --- a/config/crd/bases/networking.metal.ironcore.dev_devices.yaml +++ b/config/crd/bases/networking.metal.ironcore.dev_devices.yaml @@ -191,6 +191,10 @@ spec: description: Paused can be used to prevent controllers from processing the Device and its associated objects. type: boolean + provider: + description: Provider is the name of the provider plugin which is + responsible for reconciling the CRD connected to the device + type: string provisioning: description: |- Provisioning is an optional configuration for the device provisioning process. diff --git a/docs/api-reference/index.md b/docs/api-reference/index.md index af84cc064..53c923bea 100644 --- a/docs/api-reference/index.md +++ b/docs/api-reference/index.md @@ -1786,6 +1786,7 @@ _Appears in:_ | --- | --- | --- | --- | | `paused` _boolean_ | Paused can be used to prevent controllers from processing the Device and its associated objects. | false | Optional: \{\}
| | `endpoint` _[Endpoint](#endpoint)_ | Endpoint contains the connection information for the device. | | Required: \{\}
| +| `provider` _string_ | Provider is the name of the provider plugin which is responsible for reconciling the CRD connected to the device | | Optional: \{\}
| | `provisioning` _[Provisioning](#provisioning)_ | Provisioning is an optional configuration for the device provisioning process.
It can be used to provide initial configuration templates or scripts that are applied during the device provisioning. | | Optional: \{\}
|