image-automation-controller icon indicating copy to clipboard operation
image-automation-controller copied to clipboard

Get repository content from source-controller

Open nonylene opened this issue 2 years ago • 1 comments

Currently image-automation-controller clones git repositories from upstream server (i.e. github.com) at a specified automation interval. This tends to lead high-frequent git requests to upstream and some clone errors from upstream perhaps for reasons of something like rate-limit.

If image-automation-controller could get repository content from source-controller for periodically checks, like kustomize-controller does, we may be able to reduce git clones from upstream and even more adjust the interval for cloning with GitRepository resource . Is there a way to do this?

nonylene avatar Apr 08 '22 17:04 nonylene

Hey @nonylene thank you for your first issue at Flux! :tada:

Conceptually, I can understand the motivation for making source-controller the source of truth for such data within the cluster. But I can see a few challenges with that approach:

  • source-controller only keeps a view of the source repository, which is based on the exclusion of any files defined on .spec.ignore.
  • No git index data is currently stored.
  • ImageUpdateAutomation intervals would be impacted by source-controller intervals.
  • Some users deploy image-automation-controller as a independent component, without the rest of Flux.

Based on the points above, we may have quicker wins in terms of optimisations that may easier to achieve. For example some of the points raised on https://github.com/fluxcd/image-automation-controller/issues/271, which I can see you are also involved.

pjbgf avatar Apr 08 '22 19:04 pjbgf