Open bgrant0607 opened 2 years ago
I tried to removed the shell and git clone
failed. It doesn't pass even the most trivial e2e test.
Looking at go-git, some of what we need (rev-parse, ls-remote, and worktree at least) are not supported. Worktree is pretty important. There may be workarounds, but it's not a drop-in.
libgit2 would require CGO, which is a can of worms which we can evaluate.
Thanks for checking, and for describing the obstacles.
I opened this as a place for interested parties to look and/or comment.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
For kicks, I tried this against my current working branch, which has some huge changes, including #691
I can make it run without a shell EXCEPT FOR submodules. If I set submodules=off
it seems to run.
I don't know what we want to do with that information.
What would removing the shell mean for exechook-command
actions?
The exechooks mechanism doesn't depend on a shell, but I suspect many exechooks are written as shell scripts.
Assuming we got rid of the shell, I suspect we would want to produce 2 images - with and without shell, or make sure people could build their own images on top of the shell-free one, or something.
But as it stands, we still need the shell, so....
Yes, I was already looking at adding curl in order to use it in an exechook-command
❯ cat Dockerfile
FROM registry.k8s.io/git-sync/git-sync:v3.6.6
ADD --chmod=655 https://github.com/moparisthebest/static-curl/releases/download/v8.0.1/curl-amd64 /bin/curl
❯ docker image ls| grep 3.6.6
git-sync v3.6.6-curl 8f391e1a6dd1 About a minute ago 165MB
registry.k8s.io/git-sync/git-sync v3.6.6 ab1b1c64ba67 6 days ago 162MB
We have webhooks - does that work better for you?
Also, you can (for now?) apt-get install
curl
Webhooks don't work because they are executed at the same time or before the exechook execution. Using apt-get bloats the image.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
FTR: git submodule is still a script :(
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/lifecycle frozen /remove-lifecycle stale /remove-lifecycle rotten
Either replace use of the git CLI with go-git or libgit2, like ArgoCD and Flux, or otherwise eliminate the need for a shell (reimplement submodules?).