-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Sync doesn't work with Helm: Skipping deploy due to sync error: copying files: didn't sync any files #2478
Comments
I found out that right here: When using Helm, this expression is never true, because c.Image is the image that doesn't contain the tag, i.e.:
When not using helm, both values contain the tag and thus are equal when the correct pod is evaluated:
|
#2111 did not fix this for me by the way. |
I'm experiencing the same issue with the latest version of skaffold (v0.36.0) on Mac with Docker for Mac when I use helm for the deployment. The file change is detected, but the sync fails with the same warning:
|
Hi @kasvtv and @andreassiegel, I wonder if there's any way you can test #2772 and see if solves your issue. |
I checked out that version and tried to run my scenario with it. Unfortunately, the behavior is still the same:
I wonder if that's related to the behavior of the
The log output from above clearly indicates that there is also another tag in play, but I don't know how I get skaffold to use a tag like that for the build. I just remember that I had the file sync working when I used manifest files instead of helm charts, but that's already a while ago. Therefore I'm not sure which piece in my setup is the actual problem. |
I also double-checked it with the example provided by @kasvtv. This example doesn't set an explicit tag policy, but seems to be using
After a file was updated, the change is detected, but the sync also fails:
Note that this time the sync fails because pods are not running. So I checked the running pods, and saw them running just fine:
Then I wanted to check if the sync probably failed because a pod was restarting, and updated the file again:
This time there isn't any additional log output, just the warning about the error. |
:-( Let me take some time to read your comments |
OK, the first issue I see is that none of the Kubernetes manifests use templating to replace the image names. This means that the yams files are applied as is.
Something like here Without that, nothing will work. |
This could indeed be related to my problem as well: Even though my helm chart is using a variable for the image, I don't alter it in If it doesn't need to be overridden using some additional templating that's at least not a problem in my case. |
Well, that probably can't be it, I guess... At least there is now a set or variables in place, I updated the deployments using something like this:
However, unless skaffold does some analysis it probably doesn't know what variables are actually used for the image name. Apologies if that thought might be sort of stupid, I'm absolutely not into the details of skaffold internals. 🙃 The outcome regarding file sync is still the same:
|
@andreassiegel no worries. I don't know anything about helm myself. Instead of adding those lines to with something like:
|
I pushed more code to properly apply labels to all deployed resources |
Thanks a lot @dgageot! It is working with the latest version from master now. However, in my setup some additional changes were required to make it work in the end. I'll list them here just in case they're helpful for someone else as well:
BTW: I ended up with a Docker build argument to set the user because in actual production deployments I certainly don't want to use a root user. |
@andreassiegel looks like you were able to get this work. |
is it released already? because I'm still facing this issue, using skaffold 0.40.0 |
Yes, it is released and working fine. If I remember it correctly, the fix was included in v0.38.0. |
@andreassiegel do you have recommendations to follow to make it work? I saw your previous message, but I was not able to reproduce that |
@igoooor Is there any chance you can share your project or provide a minimal sample to reproduce your issue? |
I fixed my issue by reading all the messages again, sorry about that |
Expected behavior
File sync works like it did before I configured Skaffold to use Helm
Actual behavior
File sync fails to copy files:
What's also peculiar is the following error messages, since all of these resources are actually available in the default namespace:
Full log (after building the images):
Information
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: