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
Kustomize aliases without newTag defined result in a nil pointer dereference and application crash #181
Comments
My main confusion in all this is that the Does the |
Thanks @amalagaura, this is indeed a bug. To explain the background: The Image Updater inspects the Argo CD Application for running images, and does expect a tag in that information. If you don't set a tag in your I have just committed #182 to master which fixes this issue. |
Thanks @jannfis this is helpful. From a bootstrap point of view it would be nice to set the image information only in one place. But I understand how the purpose of the image updater is to refine the restrictions on the images set from the manifests and not necessarily to override completely. We are doing a complete override because we are trying to set image information only in one place in order to have very generic templates that teams override in one kustomization.yaml file only. |
Yes, I think I understand the use-case. The behavior of Image Updater supports that now with #182 merged, When you now apply manifests without a tag, the pod will probably not spin up. However, when Image Updater comes around, it treats the non-existing tag as reason for an update, and sets the image's tag to the one it considers latest according to your update strategy. Please give it a spin and let me know whether it worked out for you. |
@jannfis I tried from master and it seems to be working without the But I am still confused regarding this. I tried removing the images section completely from the So it did not search for the alias which was Thank you |
The docs are outdated and wrong, sorry for that. See #184 for a similar discussion. So, to wrap it up
|
Apologies in advance. I read through all the discussions but I am still not able to get things working the way I think they should. I tried many different combinations but I don't think I have the configuration correct. If I understand correctly, adding the the Maybe I am trying to simplify this too far but I saw the other comment did not have an image override in the Deployment.yaml
I am hopelessly confusing myself at this point between aliases and images but the nginx example also made it difficult. Do I need to introduce something like the following?
But I tried this too with no change to the ArgoCD parameters. The parameters are not getting updated in the ArgoCD web UI beyond It is not a big deal to set the image override in kustomize but I feel like I am missing something here. |
Hey @amalagaura - I can understand your confusion, as I found myself a little confused too :) But I think there's indeed a bug - or a not yet existing feature - in the update loop for this special scenario, which tbh, I have not considered yet. So, this is how the update loop currently works:
To implement this and overcome this almost "chicken-egg" problem, we would to need to also consider scanning for the image defined in |
@jannfis sorry to pile on, but I've just run into the "seems not to be live in this application" message trying to update a PodTemplate. Is there a way around the container not being in the status? |
Hey, we were just discussing a similar requirement in #187 |
Thanks for our attention @jannfis. This issue has resurfaced in the 0.9.x series.
|
Hey @amalagaura, this has never been fixed in the 0.9.x release branch, I think. The change was only made in the master branch so far. That being said, the release 0.10 is overdue and I really should take some time to do the release. This will also contain the fix, along with a couple of new features. |
Is this still reproducible with v0.11.0? |
Feel free to re-open this issue if it the problem persists. |
Describe the bug
We wish to have a generic kustomization.yaml without an image tag. We wish to use the argocd image updater to set the image tags. We use a generic image name called
image
. We first tried without the image alias in kustomization.yaml. In that case the image updater fails to update or find the image alias. Apparently Kustomize needs to do a first pass to change the image alias to the final image. So then we add the imagenewName
. But without anewTag
the application crashes.To Reproduce
A kustomization.yaml with the contents:
with Argo Application with annotations:
This creates a panic and the application crashes
Expected behavior
Image updater should allow
newTag
to be empty because it is valid according to Kustomize. Kustomize applieslatest
as the image tag.Additional context
We use a generic
image
name in our deployment.yaml files and rely on kustomize image aliases to set the correct image. We are also not clear with theargocd-image-updater.argoproj.io/image.kustomize.image-name
is supposed to designate.Version
v99.9.9+ccd78aa
Logs
The text was updated successfully, but these errors were encountered: