-
Notifications
You must be signed in to change notification settings - Fork 70
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
images are not fetched #180
Comments
I'm having the same issue, but with a deployment. My ImagePolicy is able to retrieve the correct image and tag, but the image itself is not updated for some reason. The ImageUpdateAutomation doesn't see any updates and constantly has the |
@martijnjanssen please take a look on the discussion which we have here: |
@martijnjanssen It sounds like you have a different problem. As I parse the discussion here, the automated updates are working (writing to git) but do not have an effect when synced to the cluster. I think your problem is that the automation does not make a commit, is that right? |
Yes, I will take a look at it again later, maybe I can spot the issue. If not I can file an issue or start a discussion. It does indeed not make a commit, however, it does detect the newer image. Anyway, I'll stop bumping this issue 😉 Update: I have fixed my issue by moving my |
@squaremo Did you managed to fix your problem? I am having the same issue whereby the containers are not getting updated with new image. In my case the flux is not even updating the deployment yaml with newer version. However when I run get image policy, I can see that flux is able to identify that a newer version is available. I have logged my issue here . Will appreciate any help or pointers [https://github.com/fluxcd/flux2/issues/1274] |
I think i might know what is going on here, if I understand the issue correctly. You are having Flux update the Suggest a slightly different approach:
As I understand it, Flux will commit back to your repo into |
If you use the spec.values like suggested @nomeelnoj it will work without bumping the chart version in Git. |
Hey there guys! Enjoyed so far my fluxcd experience, though similarly to kadzielawa I have issues with automatic image updates to git repo. Here is some info around it: Repo structure
bootstrap was done like this
image creation
image policy
image update automation
The update is expected to happen over helm release (based on GitRepository - helm source object) helm_source.yaml
helm_release.yaml
Unfortunately automatic commit just doesn't happen with this setup for me though as I've read above and in documentation it should, would be grateful for ideas or hints. |
@dmitry-rachkov Thank you for your report, but I do not think your issue is the same as the original poster of this issue. It appears you may have placed your GitRepository source in a different namespace than the Image Automation resources (
If your resources were created in the Cross-namespace secret references are not currently a valid configuration in Flux and variations on this issue seem to be collectively the top most common error facing users of ImageUpdateAutomation. (You're not even the first person in this thread to have hit this problem: #180 (comment)) I have submitted a PR to add a note to the API docs (#200), but if this turns out to not have been your problem, please open a separate issue, as I think the top poster did not have this misconfiguration issue. I am also working on a way to elevate this to a higher prominence in the FAQ, or even better, with an error message, but some variants of the issue like the way this problem seems to be presenting for you will unfortunately not be able to signal an error. (You apparently referenced in your kyaml setter an ImagePolicy at a location that does not exist, and ImagePolicy/ImageUpdateAutomation resources only look for references to themselves when scanning for tags that they should update.) Please also a note from the community support policy: if you are not sure if you are using the API correctly, rather than filing it as an issue or bug report, we think the Q&A section of the discussion board on fluxcd/flux2/discussions is the most appropriate place to post an inquiry like this. (Thanks for using Flux!) |
I marked this as a documentation, because there is documentation I would like to see added as we've discussed before, the "recipe" book showing which ways you can configure ImageUpdateAutomation in formulaic ways, and how cross-namespace support is or is not ready for use in general availability. But I've also given this issue the 'bug' label as for usability, we want Flux's image automation to be as easy to configure from the CLI as it was in Flux v1 (or even, say, in Weave Cloud.) Users should be able to detect images which can be updated, select from whether they have a semver format or some regex, receive feedback and guidance at the CLI which helps them know when image tags match the format, which images can be selected from, and which candidate is considered as the latest before they apply the image update policy to the cluster, and so on. Maybe all that belongs in a separate issue, but there are already a couple of different issues open related to the usability, I think this story is already found in one or more of them. It would be even better if the CLI could help you determine what updates can be applied to a file, and trace for you what image update automations would apply to this gitrepository path when reconciled, or lead you to notice when IUA is not correctly associated with the path you wanted. And even when your sourceRef is inappropriately specified with an invalid or not present GitRepo, which can often happen when users are first trying automation and have not been appropriately warned about the cross-namespace issues, namely that cross-namespace secret access is not currently supported, so as it was maybe already explained above, image update which are not in the same namespace as ImageRepo, or similar issues, #201 Right now the CLI helps you build the YAML and interact with the status, but it does not do most of all that. |
I spent some time determining why my ImageUpdateAutomations stopped working after I moved my Deployment objects. For me, it was that I didn't have a Kustomization for the new location setup. I found that in the earlier failed attempts to update the image, the log doesn't indicate failure: for ImageUpdateAutomation, the
for this I wanted to be able to check what files were getting pulled down into the working dir I'm using the latest flux, 0.23.0. I found that I was able to run ImageUpdateAutomation in another namespace if I had all of the following in the different namespace: GitRepository, ImageRepository, ImagePolicy, ImageUpdateAutomation, and Kustomization. |
Hello,
thank you for your powerful tool, I really like it! great job ! it's big milestone to gitops :)
I have problem with fluxcd2 because during creating processes which would be automatically after pushing images to ECR repository, HelmRelease is not upgrading containers however ImageUpdateAutomation works great and helm values file is updated on git repository very well.
not upgrading containers - I mean that even in repository the image is in the newest version eg.(sdd9) container is still in wrong version...
do you have any ideas what it's wrong with those files?
flux logs doesn't return nothing special... I see only that every one minute updating working.
something like values.yaml are not valid recognize by kubernetes
structure (my-private-repo)
-file1.yml
-file2.yml
-file3.yml
---eks(directory)
-------heyflux(directory)
----------values.yaml
----------Chart.yaml
----------rest chart files
file1.yml
file2.yml
file3.yml:
eks/heyflux/values.yaml
The text was updated successfully, but these errors were encountered: