Skip to content

Instantly share code, notes, and snippets.

View acardace's full-sized avatar
🇮🇹

Antonio Cardace acardace

🇮🇹
View GitHub Profile
@acardace
acardace / debug-KV.md
Last active March 21, 2022 07:45
Debug KubeVirt controllers

TL;DR

Apply this patch, run make && make cluster-up && make cluster-sync, do a port-forward of the virt-controller 40000 port and connect to the remote dlv dlv connect :40000.

Compile in debug mode

This example shows the steps for the virt-controller but they apply to any binary in KubeVirt.

Let's start by adding the debug compilation options to not optimize the binary. Edit cmd/virt-controller/BUILD.bazel as follows.