GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
15.02k stars 1.62k forks source link

Skaffold generated with generate-manifests doesnt sync code when you use with Cloud Code "Debug on Kubernetes" #7247

Open VeerMuchandi opened 2 years ago

VeerMuchandi commented 2 years ago

Expected behavior

If you make changes to the code while in "Debug on Kubernetes" the code sync between the editor and the container should work exactly the same way as with "Run on Kubernetes"

Actual behavior

Instead of syncing the code, it rebuilds the container and deploys again.

Information

apiVersion: skaffold/v2beta27
kind: Config
metadata:
  name: mynodejsapp
build:
  artifacts:
  - image: mynodejsapp
    buildpacks:
      builder: gcr.io/buildpacks/builder:v1
deploy:
  kubectl:
    manifests:
    - deployment.yaml
portForward:
- resourceType: service
  resourceName: mynodejsapp
  port: 8080

Steps to reproduce the behavior

  1. Follow the steps here https://github.com/VeerMuchandi/InnerLoopDev/blob/main/NodeJsInnerLoopSetup.md
  2. Run the application in debug mode with Debug on Kubernetes
  3. Make a change to the message while in the debug mode and notice that it rebuilds the container and redeploys as opposed to just syncing the files when you use "Run on Kubernetes"
tejal29 commented 2 years ago

Thanks @VeerMuchandi, would it possible for you to add a verbose=trace logs.

If not, its completely fine.

tejal29 commented 2 years ago

Thanks a lot created a gist for this and posted it here for the team to take a look https://gist.github.com/tejal29/aacdb13cf8830609b0845606bbc1c0b0