Open kallentrustle opened 1 month ago
@chengfang that is working! Thank you! But I'm noticing the following behaviors with it.
The RunService app has force-update: "true"
. When I watch the log, I see the image_tag is empty. See below.
time="2024-07-19T22:18:50Z" level=info msg="Setting new image to us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-python:098771d" alias=hello-cloudrain-aiu-test application=hello-cloudrain-aiu-test image_name=PROJECT_ID/MYREPO/hello-python image_tag=<MISSING> registry=us-central1-docker.pkg.dev
time="2024-07-19T22:18:50Z" level=info msg="Successfully updated image 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-python' to 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-python:098771d', but pending spec update (dry run=false)" alias=hello-cloudrain-aiu-test application=hello-cloudrain-aiu-test image_name=PROJECT_ID/MYREPO/hello-python image_tag=<MISSING> registry=us-central1-docker.pkg.dev
time="2024-07-19T22:18:50Z" level=debug msg="Using commit message: build: automatic update of hello-cloudrain-aiu-test\n\nupdates image PROJECT_ID/MYREPO/hello-python tag '<MISSING>' to '098771d'\n"
time="2024-07-19T22:18:50Z" level=info msg="Committing 1 parameter update(s) for application hello-cloudrain-aiu-test" application=hello-cloudrain-aiu-test
I tested this with a containerized app. Here hello-go uses force-update: "false"
. image_tag not missing.
time="2024-07-19T22:57:04Z" level=info msg="Setting new image to us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:7dc21d1" alias=hello-go application=hello-go image_name=PROJECT_ID/MYREPO/hello-go image_tag=ce102ef registry=us-central1-docker.pkg.dev
time="2024-07-19T22:57:04Z" level=info msg="Successfully updated image 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:ce102ef' to 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:7dc21d1', but pending spec update (dry run=false)" alias=hello-go application=hello-go image_name=PROJECT_ID/MYREPO/hello-go image_tag=ce102ef registry=us-central1-docker.pkg.dev
time="2024-07-19T22:57:04Z" level=debug msg="Using commit message: build: automatic update of hello-go\n\nupdates image PROJECT_ID/MYREPO/hello-go tag 'ce102ef' to '7dc21d1'\n"
time="2024-07-19T22:57:04Z" level=info msg="Committing 1 parameter update(s) for application hello-go" application=hello-go
Here hello-go uses force-update: "true"
. There's no difference regarding the presence of the image_tag -- it's present.
time="2024-07-19T23:11:09Z" level=info msg="Setting new image to us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:72c945f" alias=hello-go application=hello-go image_name=PROJECT_ID/MYREPO/hello-go image_tag=7dc21d1 registry=us-central1-docker.pkg.dev
time="2024-07-19T23:11:09Z" level=info msg="Successfully updated image 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:7dc21d1' to 'us-central1-docker.pkg.dev/PROJECT_ID/MYREPO/hello-go:72c945f', but pending spec update (dry run=false)" alias=hello-go application=hello-go image_name=PROJECT_ID/MYREPO/hello-go image_tag=7dc21d1 registry=us-central1-docker.pkg.dev
time="2024-07-19T23:11:09Z" level=debug msg="Using commit message: build: automatic update of hello-go\n\nupdates image PROJECT_ID/MYREPO/hello-go tag '7dc21d1' to '72c945f'\n"
time="2024-07-19T23:11:09Z" level=info msg="Committing 1 parameter update(s) for application hello-go" application=hello-go
Describe the bug
I'm getting started using ArgoCD Image Updater (AIU). It's giving an error for one of my use cases where I deploy to GCP Cloud Run using ArgoCD. When a new docker image is ready for Cloud Run, I see this error message: "Image 'PROJECT_ID/MYREPO/hello-python' seems not to be live in this application, skipping" application=hello-thersitean-aiu-test".
As usual I'm hoping the problem is 'pebcak' and it's easy to spot .. Can anyone help?
In my example, hello-python is a docker image of a simple python app. hello-thersitean-aiu-test Application is a RunService that runs the hello-python image. (RunService is from Google Config Connector)
hello-thersitean-aiu-test launches with tag 0cf9946. It should upgrade to the latest tag b0d1559, but AIU isn't upgrading it. When the new tag lands on the repo, this is what I see in the AIU log:
For an application that is not a RunService, but a Deployment, AIU successfully updates it:
Here is the hello-thersitean-aiu-test argocd Application
Here is the kustomize and runservice in the gitops repo:
To Reproduce In my case, I have a ArgoCD on a GKE cluster with addon Google Config Connector. Apply the Application file, it should launch the Cloud Run service using the initial image tag. Then update the image, pushing a new one to your artifact repo using CI. AIU detects the update image on the repo, but skips it.
Expected behavior I expect AIU does not skip the new image tag, but updates the Cloud Run service using it.
Version argocd-server: v2.11.3+3f344d5 argocd-image-updater v0.13.1
Logs Logs above inline