From 96a778681f3c1b1a75b7ac12da908322270254fc Mon Sep 17 00:00:00 2001 From: Hardik Dodiya Date: Mon, 24 Aug 2026 10:57:28 +0200 Subject: [PATCH 1/2] Disable running controller with both ipxe and httpboot method Signed-off-by: Hardik Dodiya --- api/v1alpha1/zz_generated.deepcopy.go | 2 +- cmd/main.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 01240c6..3b6f17c 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -8,7 +8,7 @@ package v1alpha1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/cmd/main.go b/cmd/main.go index f83f8cb..89c0b40 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -135,6 +135,15 @@ func main() { setupLog.Info("Ignoring --default-httpboot-uki-url because --default-httpboot-oci-image is set") } + ipxeControllersEnabled := controllers.Enabled(ipxeBootConfigController) || controllers.Enabled(serverBootConfigControllerPxe) + httpControllersEnabled := controllers.Enabled(httpBootConfigController) || controllers.Enabled(serverBootConfigControllerHttp) + if ipxeControllersEnabled && httpControllersEnabled { + setupLog.Error(nil, "invalid controller combination: iPXE and HTTPBoot controllers cannot run together; "+ + "use --controllers to enable only one boot method group "+ + "(ipxe group: ipxebootconfig, serverbootconfigpxe; http group: httpbootconfig, serverbootconfighttp)") + os.Exit(1) + } + // set the correct ipxe service URL by getting the address from the environment if controllers.Enabled(ipxeBootConfigController) || controllers.Enabled(serverBootConfigControllerPxe) { if ipxeServiceURL == "" { From ec527e271fbc7db80e7efc2b64113e25b3250cca Mon Sep 17 00:00:00 2001 From: Hardik Dodiya Date: Mon, 24 Aug 2026 13:14:29 +0200 Subject: [PATCH 2/2] Fix lint and code-gen error Signed-off-by: Hardik Dodiya --- .golangci.yml | 1 - api/v1alpha1/zz_generated.deepcopy.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d021f20..115c575 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,7 +9,6 @@ linters: - errcheck - ginkgolinter - goconst - - gocyclo - govet - ineffassign - lll diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3b6f17c..01240c6 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -8,7 +8,7 @@ package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" )