{"id":25828819,"url":"https://github.com/majst01/csi-driver-s3","last_synced_at":"2025-04-03T03:09:30.321Z","repository":{"id":36969477,"uuid":"314868287","full_name":"majst01/csi-driver-s3","owner":"majst01","description":"k8s csi driver to get pvc stored on s3","archived":false,"fork":false,"pushed_at":"2024-12-05T06:06:41.000Z","size":476,"stargazers_count":28,"open_issues_count":9,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T20:11:18.260Z","etag":null,"topics":["csi","kubernetes","s3-storage-backend","storage"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/majst01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2020-11-21T17:40:22.000Z","updated_at":"2024-09-06T07:01:32.000Z","dependencies_parsed_at":"2023-02-14T14:35:18.682Z","dependency_job_id":"07deee93-3e81-410e-bfa6-e4351ef945c2","html_url":"https://github.com/majst01/csi-driver-s3","commit_stats":{"total_commits":190,"total_committers":5,"mean_commits":38.0,"dds":"0.18947368421052635","last_synced_commit":"c72009cfdd02a4baf0d7f2ea92375bf5c5d68e4b"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majst01%2Fcsi-driver-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majst01%2Fcsi-driver-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majst01%2Fcsi-driver-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majst01%2Fcsi-driver-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/majst01","download_url":"https://codeload.github.com/majst01/csi-driver-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246927835,"owners_count":20856198,"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":["csi","kubernetes","s3-storage-backend","storage"],"created_at":"2025-02-28T18:24:25.899Z","updated_at":"2025-04-03T03:09:30.302Z","avatar_url":"https://github.com/majst01.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSI for S3\n\nThis is a Container Storage Interface ([CSI](https://github.com/container-storage-interface/spec/blob/master/spec.md)) for S3 (or S3 compatible) storage. This can dynamically allocate buckets and mount them via a fuse mount into any container.\n\n## Status\n\nThis is still very experimental and should not be used in any production environment. Unexpected data loss could occur depending on what mounter and S3 storage backend is being used.\n\n## Kubernetes installation\n\n### Requirements\n\n* Kubernetes 1.16+ (CSI v1.0.0 compatibility)\n* Kubernetes has to allow privileged containers\n* Docker daemon must allow shared mounts (Systemd flag `MountFlags=shared`)\n\n### Create a secret with your S3 credentials\n\n```yaml\n# deploy/kubernetes/secret.yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: csi-driver-s3-secret\n  namespace: kube-system\nstringData:\n  accessKeyID: \u003cYOUR_ACCESS_KEY_ID\u003e\n  secretAccessKey: \u003cYOUR_SECRET_ACCES_KEY\u003e\n  # For AWS set it to \"https://s3.\u003cregion\u003e.amazonaws.com\"\n  endpoint: \u003cS3_ENDPOINT_URL\u003e\n  # If not on S3, set it to \"\"\n  region: \u003cS3_REGION\u003e\n```\n\nThe region can be empty if you are using some other S3 compatible storage.\n\n### Deploy the driver\n\n```bash\nkubectl apply -f deploy/kubernetes\n```\n\n### Test the S3 driver\n\nCreate a PVC\n\n```bash\nkubectl apply -f deploy/sample/pvc.yaml\n```\n\nCheck if the PVC has been bound:\n\n```bash\n$ kubectl get pvc\nNAME                STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE\ncsi-driver-s3-pvc   Bound     pvc-c5d4634f-8507-11e8-9f33-0e243832354b   5Gi        RWO            csi-driver-s3  9s\n```\n\nCreate a test pod which mounts your volume:\n\n```bash\nkubectl apply -f deploy/sample/pod.yaml\n```\n\nIf the pod can start, everything should be working.\n\nTest the mount\n\n```bash\n$ kubectl exec -ti csi-driver-s3-test-nginx bash\n$ mount | grep fuse\ns3fs on /var/lib/www/html type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)\n$ touch /var/lib/www/html/hello_world\n```\n\nIf something does not work as expected, check the troubleshooting section below.\n\n## Additional configuration\n\n### Mounter\n\nAs S3 is not a real file system there are some limitations to consider here. Depending on what mounter you are using, you will have different levels of POSIX compatibility. Also depending on what S3 storage backend you are using there are not always [consistency guarantees](https://github.com/gaul/are-we-consistent-yet#observed-consistency).\n\nThe csi-driver-s3 uses s3fs to mount the bucket into the PVC.\n\n#### s3fs\n\n* Large subset of POSIX\n* Files can be viewed normally with any S3 client\n* Does not support appends or random writes\n* [s3fs](https://github.com/s3fs-fuse/s3fs-fuse)\n\n## Troubleshooting\n\n### Issues while creating PVC\n\nCheck the logs of the provisioner:\n\n```bash\nkubectl logs -l app=csi-provisioner-s3 -c csi-driver-s3\n```\n\n### Issues creating containers\n\n1. Ensure feature gate `MountPropagation` is not set to `false`\n2. Check the logs of the s3-driver:\n\n```bash\nkubectl logs -l app=csi-driver-s3 -c csi-driver-s3\n```\n\n## Development\n\nThis project can be built like any other go application.\n\n```bash\ngo get -u github.com/majst01/csi-driver-s3\n```\n\n### Build executable\n\n```bash\nmake build\n```\n\n### Tests\n\nCurrently, the driver is tested by the [CSI Sanity Tester](https://github.com/kubernetes-csi/csi-test/tree/master/pkg/sanity). As end-to-end tests require S3 storage and a mounter like s3fs, this is best done in a docker container. A Dockerfile and the test script are in the `test` directory. The easiest way to run the tests is to just use the make command:\n\n```bash\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajst01%2Fcsi-driver-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajst01%2Fcsi-driver-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajst01%2Fcsi-driver-s3/lists"}