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

Image tag updates #1648

Open
derrickburns opened this issue May 26, 2019 · 9 comments
Open

Image tag updates #1648

derrickburns opened this issue May 26, 2019 · 9 comments

Comments

@derrickburns
Copy link

@derrickburns derrickburns commented May 26, 2019

IOne of the nice features of Weave Flux is the ability to monitor a docker image repo for the publication of new images that match a given pattern, such as a regex or semver.

Then, Flux updates the image tag in the Git repo that stores manifests equivalent to the Argo
argoproj.io/v1alpha1/Application manifest. This is very elegant and useful.

This can be achieved because Weave Flux externalizes the storage of the Application manifest (they call the HelmReleases) into GitHub.

Is there an equivalent with Argo-CD? Can the applications be stored in GitHub and synced? If so, is also an equivalent way to update them automatically when new Docker images are published.

I am using Weave Flux, but prefer the GUI of Argo.

@reegnz

This comment has been minimized.

Copy link
Contributor

@reegnz reegnz commented May 29, 2019

I would welcome such a great component that complements the current ArgoCD functionality!
Even if this doesn't find it's way into argocd itself, such a component could be fully self-contained, eg. docker registry monitoring capability, git commit capability to patch manifests and a rule engine to define the rules on when to patch.
I'd say this functionality could be split out from flux into it's own component, as it's already implemented there, and is totally self-contained (not mixed with the deploy logic). I'm not that proficient yetin golang to do it myself though...

@alexec

This comment has been minimized.

Copy link
Contributor

@alexec alexec commented May 29, 2019

Yes. Applications can be stored in Github. We call this "declarative set-up".

https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/

@alexec

This comment has been minimized.

Copy link
Contributor

@alexec alexec commented May 29, 2019

However, if you want to automatically update them, that's kind of out of the purvue of Argo CD (it never writes to Git). However, amongst other solutions, you could create a nightly job in Jenkins that does this. There maybe other solutions.

@alexmt

This comment has been minimized.

Copy link
Contributor

@alexmt alexmt commented May 31, 2019

I think this can be implemented as a separate component which watches the docker registry and updates git repo. The component don't have to be embedded into Argo CD and could be used with or without Argo CD.

This would be great contribution to https://github.com/argoproj-labs

@alexec alexec added the help wanted label Jun 14, 2019
@Alwinius

This comment has been minimized.

Copy link

@Alwinius Alwinius commented Jun 27, 2019

For my Bachelor's Thesis about GitOps and ArgoCD I forked keel.sh to implement this feature. You can check it out here: https://github.com/Alwinius/keel The basics (and advanced keel features) should be working, but I still consider it alpha state since I only tested it with one deployment repository. Feel free to submit bug reports if you encounter something broken.

@stale

This comment has been minimized.

Copy link

@stale stale bot commented Aug 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 26, 2019
@alexmt alexmt added backlog and removed wontfix labels Aug 26, 2019
@reegnz

This comment has been minimized.

Copy link
Contributor

@reegnz reegnz commented Oct 15, 2019

I've looked around the https://github.com/argoproj/argoproj-deployments repo, and found some interesting things that are very much relevant to this issue:
https://github.com/argoproj/argoproj-deployments/blob/master/argocd/overlays/production/argo-cd-cm.yaml#L7
https://github.com/argoproj/argoproj-deployments/blob/master/argocd/overlays/production/argocd-repo-server-deploy.yaml#L20

So it seems they are already experimenting with a flux plugin: https://github.com/alexmt/argocd-flux.
So that's just a hint on where to start looking, I will be trying that out once I get around to it. :)

@reegnz

This comment has been minimized.

Copy link
Contributor

@reegnz reegnz commented Oct 15, 2019

OK, that just seems to implement the deploy part of flux, not the image updater part. :(

@alexec

This comment has been minimized.

Copy link
Contributor

@alexec alexec commented Oct 24, 2019

This is an eschewed feature.

Why?

One defining principle of Argo CD is that Git is the source-of-truth. Unfortunately, this is not always the case, common examples are where an app has a dependency that can change with any changes in Git.

  • Helm chart dependencies, that are not pinned
  • Kustomize remote bases, that are not pinned
  • Docker images, that are not pinned ;)

Argo CD cannot monitor these for updates, and they are not audited by. Instead, you should pin your external dependencies and have an external process that updates Git when the external dependency updates.

What Can I Do?

If you build the image yourself, then your CI job could:

  • Update the manifests, e.g kustomize edit set image $IMAGE .
  • Commit the changes, e.g. git commit -am "Update image to $IMAGE".
  • For manually synced apps, trigger the sync argocd app sync $APPNAME.

For images build elsewhere, and you do cannot pin the image, you could simple ask Argo CD to sync on a cronjob.

@alexec alexec added the workaround label Oct 24, 2019
@alexec alexec added wontfix and removed help wanted labels Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.