Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CLAB ?= clab
QEMU_IMG ?= qemu-img
TOPO ?= infra.clab.yaml
LAB_NAME ?= metal-operator-test
DISK_SIZE ?= 20G
Expand All @@ -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 \
Expand All @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions infra.clab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion kustomization/metal-operator/manager_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions metalprobe-image/cmd/metalprobe-launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down