ionos-cloud / cluster-api-provider-proxmox

Cluster API Provider for Proxmox VE (CAPMOX)
Apache License 2.0
194 stars 24 forks source link

Update development guide with instructions for remote debugging using dlv #253

Closed justinas-b closed 3 months ago

justinas-b commented 4 months ago

What steps did you take and what happened: docs/Development.md provides pretty detailed instructions how to spin up ionos-cloud/cluster-api-provider-proxmox locally for development purposes, but due to lack of experience with Tilt it is not straight forward to setup dlv for remote debugging using Tilt.

By default ionos-cloud/cluster-api-provider-proxmox container when launched by Tilt calls /manager directly, instead of wrapping it into dlv

What did you expect to happen: It would be super useful to update docs/Development.md with instructions how to debug /manager remotely.

justinas-b commented 4 months ago

It seems that this could be achieved by updating ./cluster-api/tilt-settings.json file and adding below

  "debug": {
    "proxmox": {
      "port": 30000
    }
  }

So it should look like:

{
  "default_registry": "ghcr.io/ionos-cloud",
  "provider_repos": ["../cluster-api-provider-proxmox/", "../cluster-api-ipam-provider-in-cluster/"],
  "enable_providers": ["ipam-in-cluster", "proxmox", "kubeadm-bootstrap", "kubeadm-control-plane"],
  "allowed_contexts": ["minikube"],
  "kustomize_substitutions": {},
  "extra_args": {
    "proxmox": ["--v=4"]
  },
  "debug": {
    "proxmox": {
      "port": 30000
    }
  }
}
justinas-b commented 4 months ago

Created https://github.com/ionos-cloud/cluster-api-provider-proxmox/issues/253 to add additional details to documentation