fluid/addons/glusterfs
wangshulin 968a471c41
Feature: support dynamic mount for ossfs (#3432)
* init dynamic mount

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* update thinruntime controller to watch dataset

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* refactor mount_and_umount python script to execute mount/umount command

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* update fuse pod to sync configmap

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* fix used space calculate and remove duplicate function

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* fix ut error

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* cherry-pick nodePublishMethod symlink change

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* add thinruntime controller rbac and fix some error

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* refactor mount script to use mount.path

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* Refactor code

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* bugfix: fix runtime.json is not changed bug

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Refactor `func ThinEngine.transformFuseConfig`

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* docfix: replace deprecated file path `/etc/fluid/config.json` to `/etc/fluid/config/config.json`

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Fix unit test

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Separate `func SetupWatcherForReconciler` and `func SetupWatcherForReconcilerWithDataset`

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

* Add empty line in shell scripts

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

---------

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Co-authored-by: trafalgarzzz <trafalgarz@outlook.com>
2024-05-09 12:07:03 +00:00
..
dev-guide Feature: support dynamic mount for ossfs (#3432) 2024-05-09 12:07:03 +00:00
docker Feature: support dynamic mount for ossfs (#3432) 2024-05-09 12:07:03 +00:00
readme-zh_CN.md add addons glusterfs (#3621) 2023-12-14 12:00:54 +00:00
readme.md add addons glusterfs (#3621) 2023-12-14 12:00:54 +00:00
runtime-profile.yaml add addons glusterfs (#3621) 2023-12-14 12:00:54 +00:00

readme.md

GlusterFS

该插件用于 GlusterFS.

Install

kubectl apply -f runtime-profile.yaml

How to use

Create and Deploy Dataset and ThinRuntime Resource

$ cat <<EOF > dataset.yaml
apiVersion: data.fluid.io/v1alpha1
kind: Dataset
metadata:
  name: glusterfs-demo
spec:
  mounts:
  - mountPoint: <IP:PATH>
    name: glusterfs-demo
---
apiVersion: data.fluid.io/v1alpha1
kind: ThinRuntime
metadata:
  name: glusterfs-demo
spec:
  profileName: glusterfs
EOF

$ kubectl apply -f dataset.yaml

Modify the above mountPoint to the address of the remote glusterfs you want to use.

Run pod with Fluid PVC

$ cat <<EOF > app.yaml
apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
    - name: nginx
      image: nginx
      volumeMounts:
        - mountPath: /data
          name: glusterfs-demo
  volumes:
    - name: glusterfs-demo
      persistentVolumeClaim:
        claimName: glusterfs-demo
EOF

$ kubectl apply -f app.yaml

After the application using the remote file system is deployed, the corresponding FUSE pod is also scheduled to the same node.

$ kubectl get pods
NAME                        READY   STATUS    RESTARTS   AGE
glusterfs-demo-fuse-wx7ns   1/1     Running   0          12s
nginx                       1/1     Running   0          26s

The remote file system is mounted to the /data directory of nginx pod.

How to develop

Please check doc