Provide option to disable debugging for specific modules/artifacts #6713
Labels
area/debug
kind/feature-request
priority/p3
agreed that this would be good to have, but no one is available at the moment.
Skaffold should provide a way to disable debugging for specific modules/artifacts.
_Originally posted by @akostic-kostile in https://github.com//issues/2203#issuecomment-938752959_
One of the modules I'm working on is really a pod that consists of 2 containers. I'll post Dockerfiles just so you get the idea what we're working with here:
reporting-app (file cut for brevity, I just pasted parts that are important for local dev):
Highcharts-export-server (only thing that gets installed with
npm install
is"highcharts-export-server": "^2.1.0"
):And finally skaffold.yml:
Now, what happens when I do
skaffold debug --profile local --module _reporting
? Couple of things, almost all of them wrong. :)Lets take a look at pod annotations:
For highcharts container runtime was correctly identified, but the problem is I don't care about debugging Highcharts export server. Is there a way to tell Skaffold not to debug that container? The only way I know of is to manually set pod level annotation to
debug.cloud.google.com/config: {}
, however this is far from ideal. It feels very awkward to pass configuration options to Skaffold through pod annotations, second problem is this will also stop me from debugging reporting container.Leaving that aside for now, lets take a look at what Skaffold detected for a second container. Hm, runtime jvm?! Must be because I have a variable inside Dockerfile called JAVA_VERSION. I'm installing Java so SonarQube scanner would work correctly, and JAVA_VERSION is one of the special variables Skaffold uses to detect runtime. However in this case it completely misses the mark. Can I change the variable name to something else? Sure I can, but I created this Dockerfile before I started working with
skaffold debug
, I'm just trying to make a point here that current methods of detecting runtime are far from idealTo conclude this long post there should definitely be some way to set these things from skaffold.yml, at the very least to enable/disable debugging on container level and a way to specify runtime so correct debug tools would be installed. At version 1.32 debug is very rough around the edges.
The text was updated successfully, but these errors were encountered: