kubernetes / git-sync

A sidecar app which clones a git repo and keeps it in sync with the upstream.
Apache License 2.0
2.14k stars 409 forks source link

Allow the submodule functionality for repos copied using vcs tool #855

Closed sudoalyona closed 3 months ago

sudoalyona commented 6 months ago

This sounds like a rather left field issue, but I would like to know if it's even possible to implement. In my current set up I am running an Airflow cluster on EKS. The data processing logic is sitting in one repo that I can clone using gitsync no problem. However, all the utils are in a different repo that's copied using vcs tool. I tinkered with the dockerfile myself and was able to install vcstool as part of the container image, but it's super wonky and I can only clone the second repo if I manually exec into the container and manually run all the commands. It gets even worse when I try to run it as part of the helm chart config - nothing is accessible at all. I know this explanation is a bit messy, but is this feasible at all? Thank you.

thockin commented 5 months ago

I don't know vcstool, but let me throw some blind suggestions:

1) Can this be modelled as a git submodule? We already support that. 2) Can you use git-sync's exechook to run a script in the repo which fetches and runs vcstool? We already run the exechook on every sync (including the first, and on restart).