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

Update Git-Sync to v4.1.0 to resolve arm64 issue #44

Closed
wants to merge 2 commits into from
Closed

Update Git-Sync to v4.1.0 to resolve arm64 issue #44

wants to merge 2 commits into from

Conversation

nicholas-heaton
Copy link

Updating git-sync to registry.k8s.io/git-sync/git-sync:v4.1.0 to resolve an issue with the prior git-sync version not running properly on arm64 architecture.

Git-sync 3.1.6 running against a raspberry pi cluster running k3s would fail. The error was:

$ kubectl logs git-sync -c ctr-sync
INFO: detected pid 1, running init handler
I0106 12:18:03.166056 12 main.go:321] "level"=0 "msg"="starting up" "args"=["/git-sync"] "pid"=12
I0106 12:18:03.166221 12 main.go:574] "level"=0 "msg"="cloning repo" "origin"="https://github.com/.../ps-sidecar.git" "path"="/tmp/git"
E0106 12:18:03.172930 12 main.go:347] "msg"="failed to sync repo, aborting" "error"="error running command: fork/exec /usr/bin/git: exec format error: { stdout: "", stderr: "" }"

This is apparently a common issue with running the wrong architecture.

Despite version 3.1.6 having an arm64 release (https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/git-sync@sha256:aa88eb188b3bd4bdd2a4237a4d7be2b8df0cad5be002ad82c13bf47aa2f9bd13/details?tab=pull), it fails to run properly.

Moving to 4.1.0 has resolved the issue.

@nicholas-heaton
Copy link
Author

Although this allows us to progress further, it does not sync properly as git-sync has several changes between v3 and v4.

All of the arguments changed names, and I believe the new ones are as follows:
- name: GITSYNC_REPO
value: https://github.com/nigelpoulton/ps-sidecar.git
- name: GITSYNC_BRANCH
value: master
- name: GITSYNC_DEPTH
value: "1"
- name: GITSYNC_LINK
value: "html"

that said, I cannot get it to sync properly with v4 and will be backing out of this PR.

@nicholas-heaton
Copy link
Author

Although this allows us to progress further, it does not sync properly as git-sync has several changes between v3 and v4.

All of the arguments changed names, and I believe the new ones are as follows:

that said, I cannot get it to sync properly with v4 and will be backing out of this PR.

@jlyons210
Copy link

Not sure if you fixed this on your own or not, but k8s.gcr.io/git-sync/git-sync:v3.6.5 worked for me on arm64 (Pi 5, microk8s). (ref)

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

Successfully merging this pull request may close these issues.

2 participants