Description
Describe the bug
For our git repo with a lot of commits, the image update automation stopped working.
As increasing the timeouts for the git clone [1] did not help we decided to squash a large part of the git history which dramatically reduced the time to clone the repo and also fixed the image update automation. Of course, this comes with the cost of losing the commit history.
Therefore we kindly ask if it would be possible to enable the use of git's shallow clone functionality [2], which would enable faster cloning without having to squash the git history.
[1] https://fluxcd.io/docs/components/source/api/#source.toolkit.fluxcd.io/v1beta1.GitRepository
[2] https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt
Steps to reproduce
- Install Flux with image update automation
- Increase the git history to a significant size such that a full git clone takes > 8 seconds
- Observe image automation failing
- Squash the commits in the git repository to archive shorter cloning times
- Observe image automation working again
Expected behavior
We would like flux to use GIT's shallow clone functionality [1].
[1] https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
N/A
Git provider
Bitbucket
Container Registry provider
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct