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

GitHub webhook support #29

Open
g4s8 opened this issue May 6, 2018 · 2 comments
Open

GitHub webhook support #29

g4s8 opened this issue May 6, 2018 · 2 comments

Comments

@g4s8
Copy link

g4s8 commented May 6, 2018

Feature request: add configuration to listen for GitHub webhooks instead of timer, when somebody make a change in GitHub repository, it calls pod's endpoint and kube-applier updates changed files.

@oliverhausler
Copy link

@g4s8 This is the correct approach to the problem. Frequent pulls cause unnecessary network load and admin wait times.

@gregory-lyons
Copy link
Contributor

Sorry for long delay in response!

One thing to keep in mind is that kube-applier only uses a local repo and assumes that something else is keeping the local copy in sync with a remote (e.g. a git-sync sidecar). kube-applier itself doesn't take any action (e.g. pull) to ensure its local copy is up to date - that task is sufficiently complex to warrant its own sidecar implementation. Leaning on the "do one thing" idea, I'd prefer not to bloat kube-applier by replicating the same logic.

Given that, I'm not sure a webhook approach is viable to build into kube-applier. If I push a commit to my remote and it triggers a kube-applier webhook, how can I ensure that kube-applier's local repo contains my new commit?

Perhaps there's some way that the webhook call could actually include the contents of changed file(s), but that doesn't feel like a practical approach. And you would still need a local copy of the repo anyway if you want the periodic "full runs" (which I find quite valuable).

I wonder if this might be a better feature request for git-sync, since that's the service that is actually doing pulls over the network.

General disclaimer that I'm open to changing my mind on any of the above.

brengarajalu pushed a commit to brengarajalu/kube-applier that referenced this issue Mar 8, 2019
Use the new kubectl-wrapper with the --schema-cache-dir fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants