{"id":15510417,"url":"https://github.com/ananace/flexvolume-git-live","last_synced_at":"2025-06-16T13:11:15.992Z","repository":{"id":143078632,"uuid":"215317407","full_name":"ananace/flexvolume-git-live","owner":"ananace","description":"Live git checkouts as a flexvolume driver for Kubernetes","archived":false,"fork":false,"pushed_at":"2020-07-03T13:33:56.000Z","size":48,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T03:02:42.554Z","etag":null,"topics":["flexvolume","flexvolume-driver","git","kubernetes"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ananace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-15T14:18:51.000Z","updated_at":"2022-01-27T11:36:30.000Z","dependencies_parsed_at":"2023-04-18T08:46:28.669Z","dependency_job_id":null,"html_url":"https://github.com/ananace/flexvolume-git-live","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ananace/flexvolume-git-live","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananace%2Fflexvolume-git-live","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananace%2Fflexvolume-git-live/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananace%2Fflexvolume-git-live/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananace%2Fflexvolume-git-live/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ananace","download_url":"https://codeload.github.com/ananace/flexvolume-git-live/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananace%2Fflexvolume-git-live/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260166309,"owners_count":22968635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flexvolume","flexvolume-driver","git","kubernetes"],"created_at":"2024-10-02T09:48:40.650Z","updated_at":"2025-06-16T13:11:15.969Z","avatar_url":"https://github.com/ananace.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Live Git Flexvolume for Kubernetes\n==================================\n\nFlexvolume driver for Git repos that should track updates to the mounted repo.\n\nInstalling\n----------\n\nThis Flexvolume driver is a bash script that makes use of binaries installed on\nthe Kubernetes nodes.\n\nInstalling the script itself is done simply as;\n```bash\nVOLUME_PLUGIN_DIR=\"/usr/libexec/kubernetes/kubelet-plugins/volume/exec\"\nmkdir -p \"$VOLUME_PLUGIN_DIR/ananace~git-live\"\ncd \"$VOLUME_PLUGIN_DIR/ananace~git-live\"\ncurl -L -O https://raw.githubusercontent.com/ananace/flexvolume-git-live/master/git-live\nchmod 755 git-live\n```\n\nThe `git-live` script requires a couple of tools to be installed on all the\nnodes where it's to be used, additionally it currently requires systemd for\nlaunching the background updates;\n\n- `awk`\n- `base64`\n- `git`\n- `grep`\n- `jq`\n- `realpath`\n- `sha256sum`\n\nRunning\n-------\n\nOnce the Flexvolume plugin has been installed on all relevant nodes, running it\nis as simple as creating a Kubernetes pod that will use it for a volume;\n\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: git-example\nspec:\n  containers:\n  - name: busybox\n    image: busybox\n    command:\n      - sh\n      - -c\n      - |\n        ls -l /data\n        tail -f /data/README.md\n    volumeMounts:\n    - name: data\n      mountPath: /data\n  volumes:\n  - name: data\n    flexVolume:\n      driver: ananace/git-live\n      options:\n        repo: https://github.com/ananace/flexvolume-git-live\n        interval: 5d\n      readOnly: true\n```\n\nThis example pod will check out the flexvolume sources and then actively print\nany new lines as they are added to the README file and pushed.\n\nThe interval argument is handled in the same manner as [systemd.time][1]\ntimespans. The default interval - if not specified - can be set in the\n`git-live` script as `DEFAULT_INTERVAL_SEC`, and is by default set to 15 minutes.\n\nCaveats\n-------\n\nDue to the fact that checkouts are done as root on the underlying system, the\ngit index has been moved away from the repository itself. This unfortunately\nmeans that tools inside the running pod will not be able to retrieve any data\nfrom the index of the git mount.\n\nCurrently, there's no way to differentiate read-only and read-write, the\nbackground updates will *always* override any user changes on every interval.\n\nIf you only require a static git checkout that doesn't follow any new commits,\nthe Kubernetes documentation [provides a better route][2].\n\n[1]: https://www.freedesktop.org/software/systemd/man/systemd.time.html#Parsing%20Time%20Spans\n[2]: https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananace%2Fflexvolume-git-live","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fananace%2Fflexvolume-git-live","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananace%2Fflexvolume-git-live/lists"}