Skip to content
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

Request for "latest pushed tag" update strategy #681

Open
matthewmrichter opened this issue Mar 1, 2024 · 1 comment
Open

Request for "latest pushed tag" update strategy #681

matthewmrichter opened this issue Mar 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@matthewmrichter
Copy link

matthewmrichter commented Mar 1, 2024

Is your feature request related to a problem? Please describe.
The update-strategy: latest leads to a situation which seems to make it difficult to support a rollback scenario.

Let's say your annotations are like this:

    argocd-image-updater.argoproj.io/update-strategy: latest # Use the latest tag matching the filter below
    argocd-image-updater.argoproj.io/allow-tags: regexp:^test- # Only allow tags that start with test-
    argocd-image-updater.argoproj.io/image-list: hello-world=dockerregistry.com/hello-world

Let's say you build/push image tag AAA, then BBB, but you don't like BBB so you rollback and push image tag CCC. In our GitHub Actions based pipeline at least, the layers for CCC match AAA which are already cached, so they are not re-built.

argocd-image-updater then looks for the "latest built" image - which still is BBB. Not the "latest pushed" image.

Describe the solution you'd like
It'd be great if there was a way for the update strategy to use "latest PUSHED" vs just "latest built." This would be more intuitive to end-users of the CICD pipeline.

Describe alternatives you've considered
As currently constructed, it sems like we'd have to manually get rid of the annotations on the application and hardcode the AAA or CCC tag in the Application resource to use those to do a rollback in this scenario, or like use a build ARG in the Dockerfile to force build a new layer.

Additional context
Using the argocd update method currently. Our docker registry is AWS ECR.

@matthewmrichter matthewmrichter added the enhancement New feature or request label Mar 1, 2024
@Jumat8459
Copy link

Is your feature request related to a problem? Please describe. The update-strategy: latest leads to a situation which seems to make it difficult to support a rollback scenario.

Let's say your annotations are like this:

    argocd-image-updater.argoproj.io/update-strategy: latest # Use the latest tag matching the filter below
    argocd-image-updater.argoproj.io/allow-tags: regexp:^test- # Only allow tags that start with test-
    argocd-image-updater.argoproj.io/image-list: hello-world=dockerregistry.com/hello-world

Let's say you build/push image tag AAA, then BBB, but you don't like BBB so you rollback and push image tag CCC. In our GitHub Actions based pipeline at least, the layers for CCC match AAA which are already cached, so they are not re-built.

argocd-image-updater then looks for the "latest built" image - which still is BBB. Not the "latest pushed" image.

Describe the solution you'd like It'd be great if there was a way for the update strategy to use "latest PUSHED" vs just "latest built." This would be more intuitive to end-users of the CICD pipeline.

Describe alternatives you've considered As currently constructed, it sems like we'd have to manually get rid of the annotations on the application and hardcode the AAA or CCC tag in the Application resource to use those to do a rollback in this scenario, or like use a build ARG in the Dockerfile to force build a new layer.

Additional context Using the argocd update method currently. Our docker registry is AWS ECR.

main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants