Skaffold watches the configuration file for changes.
walk(dirs) returns an error in pkg/skaffold/watch/files.go:52, where dirs contains skaffold.yaml. Basically NewFileWatcher expects directories, but the dev command stack passes it the configuration file.
apiVersion: skaffold/v1alpha2
kind: Config
build:
tagPolicy:
sha256: {}
artifacts:
- imageName: myapp
workspace: ../
deploy:
helm:
releases:
- name: myapp
chartPath: myapp
values:
image: myapp
skaffold dev@joonasmyhrberg when walking a single file, the code shouldn't fail. Could you share the whole stack trace?
@dgageot You're correct, please excuse my debugging skills.
I have narrowed down the problem to missing valuesFilePath under deploy.helm.releases[x]. When I add that the config works. It also works without it when using v0.9.0.
Also I'm not sure what you mean with the stack trace, if you still need it could you provide instructions for how you want it taken.
I can confirm the same as @joonasmyhrberg - including valuesFilesPath fixes it.
Even after setting valuesFilesPath , it still fails after the change is detected in one of the source code files and helm chart is redeployed. In my case, skaffold crashes when it finds a file from a downloaded dependency.
Watching for changes...
ERRO[0211] dev: dev step: listing files in folders: lstat charts/myapp/charts/mysql-0.8.2.tgz: no such file or directory
INFO[0211] Using kubectl context: minikube
Have the same problem when using a dependency in my helm chart. Also extracting the .tgz file didn't help. Im using windows 10.
Was trying out the helm-deployment example below
https://github.com/GoogleContainerTools/skaffold/tree/master/examples/helm-deployment the
Facing the same issue
[helm-deployment (⎈ |minikube:default)]$ skaffold dev
Starting build...
Found [minikube] context, using local docker daemon.
Building [gcr.io/k8s-skaffold/skaffold-helm]...
2018/08/03 16:42:10 No matching credentials found for index.docker.io, falling back on anonymous
Sending build context to Docker daemon 2.048kB
Step 1/1 : FROM nginx:stable
stable: Pulling from library/nginx
be8881be8156: Pulling fs layer
b4babd36efe5: Pulling fs layer
f4eba7658e18: Pulling fs layer
f4eba7658e18: Verifying Checksum
f4eba7658e18: Download complete
b4babd36efe5: Verifying Checksum
b4babd36efe5: Download complete
be8881be8156: Verifying Checksum
be8881be8156: Download complete
be8881be8156: Pull complete
b4babd36efe5: Pull complete
f4eba7658e18: Pull complete
Digest: sha256:9b52c379180db988f7ff5f90ea851bf502fdf35c6b96b3bf64911c7183dec22e
Status: Downloaded newer image for nginx:stable
---> 8ae4d16b741a
Successfully built 8ae4d16b741a
Successfully tagged 75e5ee429461045364f420e1f5d1a384:latest
Build complete in 21.506722154s
Starting deploy...
Error: release: "skaffold-helm" not found
Helm release skaffold-helm not installed. Installing...
No requirements found in skaffold-helm/charts.
NAME: skaffold-helm
LAST DEPLOYED: Fri Aug 3 16:42:33 2018
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
skaffold-helm 1 0 0 0 1s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
skaffold-helm-5c59848764-qg2fw 0/1 Pending 0 1s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
skaffold-helm-skaffold-helm ClusterIP 10.106.144.200 <none> 80/TCP 1s
Deploy complete in 2.887375273s
Watching for changes...
ERRO[0025] dev: dev step: watching files: listing files in folders: lstat : no such file or directory
Cleaning up...
release "skaffold-helm" deleted
Cleanup complete in 2.591309017s
Me and a colleague are also running into this issue.
If I set deploy.helm.releases.valuesFilePath to "" it fails.
If I create an empty test.yaml and set deploy.helm.releases.valuesFilePath to test.yaml it works but fails after a file is changed with:
Watching for changes...
ERRO[0034] dev: dev step: listing files in folders: lstat charts/example/charts/redis-3.7.3.tgz: no such file or directory
Cleaning up...
release "example" deleted
skaffold buildand skaffold run work fine.
@nathanph @mgyong @joonasmyhrberg Have you tried the latest version? Do you still face the same issue?
Yes, @dgageot.
INFO[0000] Skaffold &{Version:v.0.11.0 GitVersion: GitCommit:9c16c5946aef6d952b661bc4bf0a337fd4cb5a4a GitTreeState:clean BuildDate:2018-08-02T22:22:45Z GoVersion:go1.10.3 Compiler:gc Platform:linux/amd64}
It is possible that https://github.com/GoogleContainerTools/skaffold/issues/931 will fix this as it removes dependency charts from the watch list. Perhaps try build from master and see if it works now?
@nathanph @mgyong @joonasmyhrberg Yes, I think it's fixed now
Most helpful comment
Me and a colleague are also running into this issue.
If I set
deploy.helm.releases.valuesFilePathto""it fails.If I create an empty
test.yamland setdeploy.helm.releases.valuesFilePathtotest.yamlit works but fails after a file is changed with:skaffold buildandskaffold runwork fine.