Uploaded image for project: 'Horizon Stream'
  1. Horizon Stream
  2. HS-239

Enable and port forward debug ports in Skaffold dev

    XMLWordPrintable

Details

    • Story
    • Status: Done (View Workflow)
    • Minor
    • Resolution: Done
    • None
    • None

    Description

      Usually, `skaffold dev` does not allow you do debug the running containers. You need to use the `skaffold debug` command. We've run into a few pain points with it:

      1. You need to start and stop Skaffold/the stack to get into debug mode, which can be a problem if something is difficult to reproduce or requires a specific application state.
      2. Disables the dev loop. Small issue, can be reenabled with extra options: `skaffold debug --auto-build --auto-sync --auto-deploy`.
      3. Forces `replicas` to 1 without the ability to change it
      4. Does not allow you to suspend the JVM, which is useful for debugging startup issues
      5. Does not allow you to control the port number it forwards to. All Java containers will try 5005. Since we have more than one Java service, it increments to 5006, 5007, etc. Which container ends up on which port is unpredictable.
      6. Only opens debugger ports on the containers Skaffold is managing. If we have a container from a prebuilt image (like classic minion) and it's not part of Skaffold's build section, it won't open the port.

      Since Skaffold and some of the associated images/k8s manifest is development-only, opening the debugging ports when you run `skaffold dev` would solve all those pain points without much downside.

      • Add an environment variable to Java containers to enable the debugging ports
      • Forward the debugging ports using Skaffold
      • Update documentation

      Attachments

        Activity

          People

            geraldhumphries Gerald Humphries
            geraldhumphries Gerald Humphries
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: