git-sync icon indicating copy to clipboard operation
git-sync copied to clipboard

How to use GITSYNC_SYNC_ON_SIGNAL parameter through helm in k8s?

Open ponyfe opened this issue 2 years ago • 2 comments

I want to notify git-sync to trigger code synchronization in k8s, but I don't know how to send signal to k8s pod gracefully. Can someone help me? Thank you very much.

ponyfe avatar Jul 22 '24 11:07 ponyfe

Can you expand a little more on what you are trying to achieve? You are describing it as "on signal", but that's not how this tool currently works. Help me understand why polling loop, which is what we have, isn't sufficient for this use case? I'm not saying your requirement is wrong, I just want to understand it. It has come up a few times over the years, but not that much, and everybody who has brought it up has found other solutions.

How does the actor who is sending the "notification" know when to send it? Is the git-sync container running all the time, or is it something you want to launch, sync, and close repeatedly?

How would you like to trigger the sync? A literal unix signal is tricky because of containers. Something involving the network is easier, but now you have to think about authorization and authentication, and who's allowed to trigger, and how rapidly.

thockin avatar Jul 22 '24 15:07 thockin

Revisiting this - it's true that k8s does not make it easy to send a signal to a running pod, but that's out of scope for git-sync. I'm closing this for bookkeeping purposes, but happy to discuss if you think you need a different mode of "notification".

thockin avatar Aug 12 '24 17:08 thockin