Commit Graph

522 Commits

Author SHA1 Message Date
Tim Hockin 9bc9565cb2 Update RELEASING doc 2021-06-24 09:01:29 -07:00
Kubernetes Prow Robot 3dc0c235f5
Merge pull request #419 from thockin/release-3.x
Add Janet and Nan as approvers (3.x)
2021-06-24 05:35:41 -07:00
Kubernetes Prow Robot a5ee1b12f5
Merge pull request #413 from barney-s/412
Check for rev to be present after a fetch
2021-06-23 12:04:10 -07:00
barney-s 6baccb4c5d Check for rev to be present after a fetch
When we fetch expecting a rev/hash to be present, defensively check and fail gracefully so that a subsequent sync would get it.  Check for missing hash after a git fetch with shallow depth
2021-06-23 14:56:39 -04:00
Tim Hockin 6a6a0d0473 Add Janet and Nan as approvers
They are using git-sync and have had a bunch of ideas for improvements.
I have had a hard time finding enough time to devote to this and they
offered to help.
2021-06-23 09:57:02 -07:00
Kubernetes Prow Robot 9cd1e24966
Merge pull request #414 from barney-s/411
Cleanup worktree defensively
2021-06-22 14:36:10 -07:00
barney-s fe9c059828 Cleanup worktree defensively
This is to avoid wedge cases where the worktree was created but this function error'd without cleaning the worktree.
Next timearound, the sync loop fails to create the worktree and bails out.

We observed a case where due to #412, the next sync loop failed with this error:
" Run(git worktree add /repo/root/rev-nnnn origin/develop): exit status 128: { stdout: \"Preparing worktree (detached HEAD nnnn)\\n\", stderr: \"fatal: '/repo/root/rev-nnnn' already exists\\n\" }"
2021-06-22 16:40:58 -04:00
Tim Hockin 80a9d54ae0 unbreak e2e for github 2021-06-22 08:28:59 -07:00
Kubernetes Prow Robot f85a52d0a0
Merge pull request #405 from thockin/release-3.x
bump to logr v1.0.0-rc1
2021-06-16 14:08:00 -07:00
Kubernetes Prow Robot 921bd812d6
Merge pull request #408 from briantkennedy/rel
Improve error message for askpass.
2021-06-15 14:13:43 -07:00
Brian Kennedy edb3f08ec0 Improve error message for askpass.
When endpoint returns non-200 status, include the body in the error
message since it can contain useful information for debugging.  Also
defer closing the response body ReadCloser as this may have leaked in
the past.
2021-06-15 13:38:01 -07:00
Tim Hockin 8904c30ce9 bump to logr v1.0.0-rc1 2021-06-13 10:57:37 -07:00
Tim Hockin 2abd898038 Update README to spec UID/GID 2021-06-04 15:59:36 -07:00
Tim Hockin 3369339a32 Change libcurl workaround to be less precise 2021-05-29 09:17:16 -07:00
Kubernetes Prow Robot 78d3a6e380
Merge pull request #398 from thockin/release-3.x
Downgrade libcurl to work around HTTP bug (v3)
2021-05-29 06:22:24 -07:00
Tim Hockin 3f0d678d19 Add a testcase for github HTTPS 2021-05-28 14:18:20 -07:00
Tim Hockin 71f1bce7bd Downgrade libcurl to avoid HTTP bug 2021-05-27 10:17:38 -07:00
Tim Hockin b8c2e1a03d Dockerfile: apt install with --no-install-recommends 2021-05-27 10:01:35 -07:00
Tim Hockin 121999d92c Dockerfile: use apt-get (more stable) 2021-05-27 09:59:34 -07:00
Tim Hockin e92d277745 Makefile: plain output when building container 2021-05-27 09:58:01 -07:00
Tim Hockin a93350aa8f Dockerfile: use multi-stage for cleaner result 2021-05-27 09:56:11 -07:00
Tim Hockin 4765eb5b14 Make sure all code files have headers 2021-05-27 08:45:36 -07:00
Tim Hockin ba20771195 Small error string cleanup 2021-05-26 17:02:54 -07:00
Kubernetes Prow Robot 0ae9a0a8c5
Merge pull request #389 from nan-yu/release-3.x
Grant read access for the error file to all users
2021-05-26 14:47:39 -07:00
Nan Yu a00627d155 Grant read access for the error file to all users 2021-05-26 14:34:43 -07:00
Tim Hockin fd481d0a16 move test cleanup to the end 2021-05-26 14:30:01 -07:00
Kubernetes Prow Robot 61ded13b45
Merge pull request #387 from thockin/release-3.x
Clean up global flRoot use
2021-05-21 17:17:37 -07:00
Tim Hockin e9e682e25e Clean up global flRoot use 2021-05-21 17:10:57 -07:00
Kubernetes Prow Robot 246584d9eb
Merge pull request #383 from nan-yu/release-3.x
Create the root directory if it doesn't exist
2021-05-21 16:51:37 -07:00
Nan Yu 59f8f6a8e1 Create the root directory if it doesn't exist
The `git clone` command will create the root directory if it doesn't
exist, but if `git clone` fails, the root directory needs to be present
so that we can write the error to a file under the directory.
2021-05-11 16:59:17 -07:00
Kubernetes Prow Robot a3affe9040
Merge pull request #372 from SpencerMalone/sparse-checkouts
Add support for sparse-checkout
2021-04-23 08:32:02 -07:00
Spencer Malone 07e552b506 Add support for sparse-checkout 2021-04-23 08:17:58 -07:00
Tim Hockin e9a9d91601 Fix licenses for other arch'es 2021-04-16 08:22:00 -07:00
Kubernetes Prow Robot 7bb33fbccb
Merge pull request #376 from amccague/patch-1
Update to latest base image debian-base:buster-v1.6.0
2021-04-15 08:41:50 -07:00
Adrian McCague a07a87e0e6
Update to latest base image
Uses to the latest promoted debian base image: https://github.com/kubernetes/k8s.io/pull/1891

Overcomes two published vulnerabilities:
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24032
* https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-24031

My organisation cares about published and fixed vulnerabilities and we use this tool extensively.
2021-04-15 00:05:06 +01:00
Kubernetes Prow Robot 448f4b412c
Merge pull request #331 from nan-yu/release-3.x
Export the error details to an error file
2021-04-09 11:09:16 -07:00
Nan Yu 8ea449292b Export the error details to an error file
The current git-sync process outputs the error information to standard
out, which is inaccessible from outside the container. Users have to
dump the logs using kubectl logs in order to check the error details in
the git-sync process. This commit exports the error details to a file,
which provides users the capability to check the errors directly from
other sidecar containers.

proposal: https://github.com/kubernetes/git-sync/issues/326
2021-04-09 11:00:52 -07:00
Kubernetes Prow Robot 50917bf2f9
Merge pull request #371 from thockin/exec-hook-after-symlink-v3
Move sync-hook to after symlink flip
2021-04-07 16:53:41 -07:00
Kubernetes Prow Robot b0ac361b2c
Merge pull request #365 from thockin/licenses-v3
Copy all licenses into the container image (v3)
2021-04-07 05:17:53 -07:00
Tim Hockin d508f04bbe Move sync-hook to after symlink flip 2021-04-05 17:04:44 -07:00
Tim Hockin a9266edbef update go.mod to 1.16 2021-03-29 21:16:59 -07:00
Tim Hockin 258248aadc Copy all licenses into the container image 2021-03-29 16:41:57 -07:00
Tim Hockin b161f3f0c7 Add infrastructure for build tools
As per discussion with Go team.  it's hacky but it works.

create tools.go
git add tools.go
go mod vendor
git add vendor
go mod tidy
go mod vendor # again
2021-03-29 16:35:13 -07:00
Tim Hockin ab63a9181a Update Go module metadata 2021-03-29 16:31:08 -07:00
Shubham Choudhary 32828834a7
Add GIT_SYNC_ROOT change for non-root user in docs/ssh (#354)
* Add GIT_SYNC_ROOT change for non-root user in docs/ssh

https://github.com/kubernetes/git-sync/pull/97\#issuecomment-800606819

* linewrap

* minor

* Add GIT_SYNC_ROOT change for non-root user in docs/ssh

https://github.com/kubernetes/git-sync/pull/97\#issuecomment-800606819

* linewrap

* minor

* minor
2021-03-24 21:55:29 -07:00
Kubernetes Prow Robot f28d802e7c
Merge pull request #360 from thockin/build-no-tty-v3
Don't require a TTY to build/test
2021-03-18 05:29:19 -07:00
Tim Hockin 68f8497ad5 Don't require a TTY to build/test 2021-03-17 21:59:39 -07:00
Kubernetes Prow Robot dca446e054
Merge pull request #343 from thockin/fix-pid1-exit-code-v3
Fix exit non-zero exit codes when running as pid1
2021-03-15 09:37:05 -07:00
Tim Hockin 11c2a1fd7b Fix exit non-zero exit codes when running as pid1
Prior to this we would swallow the exit code and always exit(0).
2021-03-15 09:30:46 -07:00
Kubernetes Prow Robot de2a216922
Merge pull request #341 from thockin/add-git-configs-flag-3.x
Add --git-config flag
2021-03-15 07:45:05 -07:00