Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skaffold helm sync fails with warning #2559

Closed
amurdock opened this issue Jul 28, 2019 · 5 comments
Closed

skaffold helm sync fails with warning #2559

amurdock opened this issue Jul 28, 2019 · 5 comments

Comments

@amurdock
Copy link

amurdock commented Jul 28, 2019

Expected behavior

files sync to container without a rebuild when updated

Actual behavior

skaffold fails to sync files, prints warn log

Information

  • Skaffold version: v0.34.1
  • Operating system: macOS 10.14.5 (18F132)
  • Kubernetes: v1.10.11
  • Docker: 18.09.2
  • Minikube: v1.2.0
  • Helm: v2.13.1
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta13
kind: Config
build:
  tagPolicy:
    sha256: {}
  artifacts:
  - image: amurdock/node
    context: packages/node
    sync:
      manual:
      - src: 'index.js'
        dest: '.'
deploy:
  helm:
    releases:
    - name: skaffold-helm-example
      chartPath: k8s
  • Output:
DEBU[0007] Found dependencies for dockerfile: [{index.js /root true}] 
INFO[0007] files modified: [packages/node/index.js]     
Syncing 1 files for amurdock/node:61b03bf18376cb8ce916213e632e505849b114d7e409c0a71dcabdceaaf73129
INFO[0007] Copying files: map[packages/node/index.js:[/root/index.js]] to amurdock/node:61b03bf18376cb8ce916213e632e505849b114d7e409c0a71dcabdceaaf73129 
WARN[0007] Skipping deploy due to sync error: copying files: didn't sync any files 
Watching for changes...

Steps to reproduce the behavior

  1. clone this repo
  2. skaffold dev -v debug
  3. make trivial change to packages/node/index.js file
@amurdock
Copy link
Author

amurdock commented Jul 28, 2019

I appreciate there's several of these helm sync failure issues floating about but I've looked through each one and there's no indication that the configuration is incorrect or that what I'm trying to do isn't supported. Any help would be gratefully received.

@amurdock
Copy link
Author

I've tried both infer and manual syncing approaches and both have the same symptomes.

@yolkov
Copy link

yolkov commented Jul 29, 2019

#1566 (comment)

@corneliusweig
Copy link
Contributor

This looks like a configuration error. When trying sync with the helm deployment example, it works for me.

Can you try applying the following patch on your example:

diff --git a/k8s/templates/deployment.yaml b/k8s/templates/deployment.yaml
index 6a98e25..40f3260 100644
--- a/k8s/templates/deployment.yaml
+++ b/k8s/templates/deployment.yaml
@@ -24,7 +24,7 @@ spec:
     spec:
       containers:
       - name: node
-        image: amurdock/node
+        image: {{ .Values.image }}
         imagePullPolicy: Never
         ports:
         - containerPort: 3000
diff --git a/packages/node/index.js b/packages/node/index.js
index a6cb82f..3b5f4f4 100644
--- a/packages/node/index.js
+++ b/packages/node/index.js
@@ -5,4 +5,4 @@ const server = http.createServer((req, res) => {
   res.end('ok')
 })
 
-server.listen(3000)
\ No newline at end of file
+server.listen(3000)
diff --git a/skaffold.yaml b/skaffold.yaml
index 65640c7..160dda6 100644
--- a/skaffold.yaml
+++ b/skaffold.yaml
@@ -15,3 +15,5 @@ deploy:
     releases:
     - name: skaffold-helm-example
       chartPath: k8s
+      values:
+        image: amurdock/node

With that, your example works for me.

@amurdock
Copy link
Author

amurdock commented Aug 1, 2019

Brilliant, amazing ... thanks for you help 👍

@amurdock amurdock closed this as completed Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants