Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| .github/workflows | 1 year ago | |
| cmd/csi-rclone-plugin | 1 year ago | |
| deploy/kubernetes | 1 year ago | |
| example/kubernetes | 1 year ago | |
| pkg/rclone | 1 year ago | |
| .gitignore | 1 year ago | |
| CHANGELOG.txt | 1 year ago | |
| Dockerfile | 1 year ago | |
| Dockerfile.dm | 1 year ago | |
| LICENSE | 1 year ago | |
| Makefile | 1 year ago | |
| README.md | 1 year ago | |
| VERSION | 1 year ago | |
| go.mod | 1 year ago | |
| go.sum | 1 year ago | |
| install-dm.sh | 1 year ago | |
Fork of https://github.com/wunderio/csi-rclone that is a bit slow with merging PRs
Differences with that fork:
This project implements Container Storage Interface (CSI) plugin that allows using rclone mount as storage backend. Rclone mount points and parameters can be configured using Secret or PersistentVolume volumeAttibutes.
Works (tested):
deploy/kubernetes/1.19: K8S>= 1.19.x (due to storage.k8s.io/v1 CSIDriver API)deploy/kubernetes/1.13: K8S 1.13.x - 1.21.x (storage.k8s.io/v1beta1 CSIDriver API)Does not work:
TLDR: kubectl apply -f deploy/kubernetes/1.19 (or deploy/kubernetes/1.13 for older version) to get the CSI setup
The easiest way to use this is to specify your rclone configuration inside the PV:
apiVersion: v1
kind: PersistentVolume
metadata:
name: rclone-dropbox
labels:
name: rclone-dropbox
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
storageClassName: rclone
csi:
driver: csi-rclone
volumeHandle: rclone-dropbox-data-id
volumeAttributes:
remote: "dropbox"
remotePath: ""
configData: |
[dropbox]
type = dropbox
client_id = xxx
client_secret = xxx
token = {"access_token":"xxx","token_type":"bearer","refresh_token":"xxx","expiry":"xxx"}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rclone-dropbox
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
storageClassName: rclone
selector:
matchLabels:
name: rclone-dropbox
(to get access token, setup Dropbox locally with rclone first, then copy whatever rclone config show gives you)
apiVersion: v1
kind: PersistentVolume
metadata:
name: rclone-wasabi
labels:
name: rclone-wasabi
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1000Gi
storageClassName: rclone
csi:
driver: csi-rclone
volumeHandle: data-id
volumeAttributes:
remote: "bucketname"
remotePath: ""
s3-provider: "Wasabi"
s3-endpoint: "https://s3.ap-southeast-1.wasabisys.com"
s3-access-key-id: "xxx"
s3-secret-access-key: "xxx"
---
<pvc manifest here>
Note: secrets act as defaults, you can still override keys in your PV definitions.
Note 2: Use secret-rclone as global default for when there are no secrets defined, for example if you always want the same S3 credentials across your PVs
Note 3: Secrets need to be in the same namespace as the csi controller, so if you used the default of this repository, add it to kube-system
apiVersion: v1
kind: Secret
metadata:
name: my-secret
namespace: kube-system # <-- secret needs to be in kube-system namespace, same as CSI controller
type: Opaque
stringData:
remote: "my-s3"
remotePath: "projectname"
configData: |
[my-s3]
type = s3
provider = Minio
access_key_id = ACCESS_KEY_ID
secret_access_key = SECRET_ACCESS_KEY
endpoint = http://minio-release.default:9000
Then specify it into the PV:
apiVersion: v1
kind: PersistentVolume
metadata:
name: rclone-dropbox
labels:
name: rclone-dropbox
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
storageClassName: rclone
csi:
driver: csi-rclone
volumeHandle: rclone-dropbox-data-id
volumeAttributes:
secretName: "my-secret"
kubectl describe <pod>kubectl logs -f -l app=csi-nodeplugin-rclone --namespace kube-system -c rcloneCurrent code is referencing projects repository on github.com. If you fork the repository, you have to change go includes in several places (use search and replace).
First push the changed code to remote. The build will use paths from pkg/ directory.
Build the plugin
make plugin
make container
Makefile and use make push to push the image to remote.make push
See CHANGELOG.txt
本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。
Go Text Markdown Shell Dockerfile other