diff --git a/Makefile b/Makefile index 2f374b5..acb6483 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ CLAB ?= clab -QEMU_IMG ?= qemu-img TOPO ?= infra.clab.yaml LAB_NAME ?= metal-operator-test DISK_SIZE ?= 20G @@ -20,10 +19,10 @@ CERT_MANAGER_MANIFEST ?= https://github.com/cert-manager/cert-manager/releases/d KIND_CLUSTER_NAME ?= k8s TFTP_IMG ?= tftp:latest KBAKE_KERNEL_TAG ?= v7.1 -METALPROBE_IMAGE_NAME ?= ghcr.io/simontesar/metal-lab +METALPROBE_IMAGE_NAME ?= ghcr.io/simontesar/metal-lab/metalprobe METALPROBE_IMAGE_TAG ?= dev -.PHONY: help deploy destroy clean-disks inspect check \ +.PHONY: help deploy destroy clean-disks inspect \ cert-manager-install cert-manager-wait \ metal-operator-deploy metal-operator-delete \ metal-operator-deploy-wait \ @@ -39,19 +38,7 @@ help: ## Show available targets @grep -E '^[a-zA-Z0-9_.-]+:.*##' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS = ":.*## "}; {printf " %-24s %s\n", $$1, $$2}' -check: ## Fail if required tools are missing - @command -v $(QEMU_IMG) >/dev/null || \ - { echo "error: $(QEMU_IMG) not found" >&2; exit 1; } - @command -v $(CLAB) >/dev/null || \ - { echo "error: $(CLAB) (containerlab) not found" >&2; exit 1; } - @command -v kind >/dev/null || \ - { echo "error: kind CLI not found (required for k8s-kind)" >&2; exit 1; } - @command -v $(KUSTOMIZE) >/dev/null || \ - { echo "error: $(KUSTOMIZE) not found" >&2; exit 1; } - @command -v $(KUBECTL) >/dev/null || \ - { echo "error: $(KUBECTL) not found" >&2; exit 1; } - -deploy: check ## Create disks and deploy lab +deploy: ## Create disks and deploy lab touch $(KUBECONFIG) # Initialises the kubeconfig with users' permissions $(CLAB) deploy -t $(TOPO) diff --git a/infra.clab.yaml b/infra.clab.yaml index d6217f5..5aa26a8 100644 --- a/infra.clab.yaml +++ b/infra.clab.yaml @@ -11,7 +11,7 @@ topology: image: ghcr.io/simontesar/qemu-bmc:v0.10.0 devices: - /dev/net/tun:/dev/net/tun - - /dev/kvm:/dev/kvm + - ${KVM_DEVICE:=/dev/kvm}:/dev/kvm cap-add: - NET_ADMIN - SYS_ADMIN @@ -28,7 +28,7 @@ topology: VM_BOOT: cn IPMI_USER: admin IPMI_PASS: password - ENABLE_KVM: "true" + ENABLE_KVM: "${ENABLE_KVM:=true}" GRACEFUL_SHUTDOWN_TIMEOUT: 15s CONSOLE_LOG: /vm/console.log diff --git a/kustomization/metal-operator/manager_patch.yaml b/kustomization/metal-operator/manager_patch.yaml index 0e0d362..7c069a5 100644 --- a/kustomization/metal-operator/manager_patch.yaml +++ b/kustomization/metal-operator/manager_patch.yaml @@ -15,7 +15,7 @@ spec: - --health-probe-bind-address=:8081 - --mac-prefixes-file=/etc/macdb/mac_prefixes.yaml - --probe-image=ghcr.io/ironcore-dev/metalprobe:latest # Not actually used with the OS image below - - --probe-os-image=ghcr.io/simontesar/metal-operator-test-framework:dev + - --probe-os-image=ghcr.io/simontesar/metal-lab/metalprobe:master - --registry-url=http://10.250.200.2:30000 - --registry-port=30000 - --skip-cert-validation diff --git a/metalprobe-image/cmd/metalprobe-launcher/main.go b/metalprobe-image/cmd/metalprobe-launcher/main.go index 845cdb4..02dc680 100644 --- a/metalprobe-image/cmd/metalprobe-launcher/main.go +++ b/metalprobe-image/cmd/metalprobe-launcher/main.go @@ -99,18 +99,9 @@ func main() { ignitionURL, _ := cmdline.Flag("ignition.config.url") if ignitionURL == "" { - // Sollte hier weitermachen, auch ohne iginition url leben park(fmt.Errorf("no ignition.config.url on kernel cmdline")) } - dhcpCtx, cancel := context.WithTimeout(ctx, 2*time.Minute) - err := configureDHCP(dhcpCtx) - cancel() - if err != nil { - park(fmt.Errorf("configuring DHCP: %w", err)) - } - slog.Info("configured DHCP") - rawFlags, err := ignitionshim.FetchFlags(ctx, ignitionURL) if err != nil { park(fmt.Errorf("fetching metalprobe config: %w", err))