-
Notifications
You must be signed in to change notification settings - Fork 72
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
Image update automation not committing the resolved version to git #159
Comments
I'm running into a similar issue. Is there a way to debug the image-automation-controller to get more info on why we're getting "no updates made"? I've got two clusters:
I may try to downgrade my TEST cluster to v0.11.0 to see if that lets things work. |
Downgraded cluster to v0.11.0, still not able to get image-automation-controller working correctly, and not sure where to start looking to understand why it isn't making an update. |
Update - Dug into the manifests for the flux components - looks like we can put the image-automation-controller in debug mode:
|
Getting:
|
Played around with the yaml for my definition - maybe something was goofed up with the imagepolicy comment? I eventually got it working but it would really be nice to have some additional mechanisms to figure out why this wasn't working. |
Hi @rayterrill, BR |
I just found out, that the problem is indeed related to the directory where the file holding the imagePolicy ref is located. My fix was adding another dir |
Potentially, yes. I did end up moving my stuff around in directories - so maybe that helped resolve it. Really wish there was a way for DEBUG mode to give enough detail to determine why it's not working so we can self-resolve these kinds of issues. |
@rayterrill What sort of debug output would have helped you? |
Ideally some way to understand why it didn't work - something like "nothing to update" or even better something like "image would be updated but setters didn't match anything" - something to indicate the reconciliation loop found work to do but something in the config prevented it from being written. I believe my problem was indeed that my folder structure and setters definition were not aligned (backed into this by moving things around until I discovered that was the problem). |
Please correct me if I'm wrong. The GitRepository, ImageRepository, ImagePolicy, and ImageUpdateAutomation must be in the same namespace. Then you need to add the image policy marker. eg
I don't know if it is expected by the design or not. I already tested the first approach and it works well. This is the fact that i found. |
The controller argument |
I started to discuss this in #180 - linking these threads so they are more discoverable and can perhaps be closed together, with a docs improvement. |
That was the problem for me.. It worked moving the files into the right directory |
Hello, so what directory do you recommend to put these files in? However if I install the image automation controller again using: It starts working right away, but again stops after a while, so I am not sure it is solely a directory issue. |
This most recent comment may be describing the same issue as These may be duplicate issues, or you may be reporting the other issue... we are investigating it from there, if it's the same. We've heard reports from a number of folks that image automation stops working after a while, and the curative action suggested that seems to be resolving it is a restart of image-automation-controller. That would likely be accomplished by reinstalling with |
@kingdonb Hey, it seems to work for now, but we didn't have many images built lately because of the holidays. Not sure if it's going to stop working after a while. Will also follow the other issue for updates. |
@raress96 #209 and #282 are probably better issues to follow. There are a lot of reports of this issue and it has been tricky from what I understand to reproduce reliably. It appears to happen when there is a connectivity or availability issue with GitHub (and then the issue persists until the controller restarts, from what I've heard based on the reports we got.) |
@kingdonb It reproduced again for me. So what I did is that I was setting up a new app with a new ImageRepository and a deployment in which I had for the But then version 4 of the app was pushed to the image repository, and the image was not updated, and I had to run Pretty weird. I will also follow those other issues and maybe my feedback helps you debug this. |
Hey, forgot to mention one thing that might be important: if I have version 3 in the k8s files, and I manually change the version to 4 in a Deployment, the image automation controller puts back version 3, so it seems to still be running but not fetching the correct version maybe. |
Facing same issue. Using flux stack on describing all
|
Same issue here: FluxCD version: 0.30.2 Output of
Output of
ImageUpdateAutomation not working, the image-automation-controller's logs says:
It looks like cannot write back the changes. |
@kallaics have you tried enabling managed transport yet? This is something we added recently that focuses on improves Git connections. You just need to get your controller pod to have the environment variable More information: |
My question removed. I will write a feedback, when the new images are coming. |
The first update caused an issue:
Additional information the URL doesn't contains |
My failed deployment had exactly the same symptoms (" |
Just in case it helps anyone else, in my case it was because the ImageUpdateAutomation had the wrong update path - duh! Simple one but easy to gloss over since there are no errors per se |
|
Please check this issue I have a problem with image update automation |
Hi team,
Thanks for your help so far. I am stuck at implementing a use case where by the image update automation policy is not applying the changes to the git.
When I run the command as below, I can see that flux was able to detect a new version in the registry but never committed the same to git.
(base) sanj@Sanjs-Air app-cluster % flux get image policy staging
NAME READY MESSAGE LATEST IMAGE
staging True Latest image tag for 'sanjvij01/getting-started' resolved to: v3.0.2 sanjvij01/getting-started:v3.0.2
(base) sanj@Sanjs-Air app-cluster % kubectl get deployment/getting-started-image -n staging -oyaml | grep 'image'
name: getting-started-image
selfLink: /apis/apps/v1/namespaces/staging/deployments/getting-started-image
- image: sanjvij01/getting-started:v3.0.1
imagePullPolicy: IfNotPresent
message: ReplicaSet "getting-started-image-554964548d" has successfully progressed.
my image update automation file looks like below. I have a feeling I have done something in which case feel free to point.
apiVersion: image.toolkit.fluxcd.io/v1alpha1
kind: ImageUpdateAutomation
metadata:
name: flux-system
namespace: flux-system
spec:
checkout:
branch: master
gitRepositoryRef:
name: flux-staging
commit:
authorEmail: [email protected]
authorName: sanjvij
messageTemplate: '{{range .Updated.Images}}{{println .}}{{end}}'
interval: 1m0s
push:
branch: master
update:
path: ./
strategy: Setters
Let me know if you need me to provide any further info.
The text was updated successfully, but these errors were encountered: