Skip to content

Commit

Permalink
Update fluid addon (#15)
Browse files Browse the repository at this point in the history
* Update fluid addon

Signed-off-by: zhujian <[email protected]>

* Upgrade fluid addon to 1.0.0

Signed-off-by: zhujian <[email protected]>

---------

Signed-off-by: zhujian <[email protected]>
  • Loading branch information
zhujian7 authored Jul 12, 2024
1 parent 9498948 commit d1d0c25
Show file tree
Hide file tree
Showing 14 changed files with 6,608 additions and 200 deletions.
36 changes: 28 additions & 8 deletions fluid-addon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ $ kubectl get addontemplate fluid-0.0.1

## Enable the fluid addon for a managed cluster

Then apply a managedclusteraddon to enable the fluid for a managed cluster(eg cluster1) by:
By default, all the managed clusters selected by the placement `placement-all` will have the fluid addon enabled with
the default configuration.

```
# Replace 'cluster1' with the managed cluster name
If you want to enable the addon on GKE clusters, use the `placement-gke` to select your GKE clusters. Then GKE specific
configuration will be applied to the managed clusters selected by the placement `placement-gke`.

If you want to enable the addon on OCP clusters, use the `placement-ocp` to select your OCP clusters. Then OCP specific
configuration will be applied to the managed clusters selected by the placement `placement-ocp`.
NOTE: Enable the fluid addon on OCP clusters is still **work-in-progress**. but here are some notable points that are
reqquired for the OCP SecurityContextConstraints:
* use `oc adm policy add-scc-to-user anyuid -z fluid-webhook -n fluid-system` to allow the fluid-webhook to run as
anyuid;
* Custimize a SecurityContextConstraints, then use `oc adm policy add-scc-to-user fluid-scc -z fluid-csi -n fluid-system`
to grant the fluid-csi necessary permissions;

$ MANAGED_CLUSTER=cluster1 \
sed -e "s,MANAGED_CLUSTER,${MANAGED_CLUSTER}," deploy/sample/mca-fluid.yaml | \
kubectl apply -f -
```

OR use the [clusteradm](https://github.com/open-cluster-management-io/clusteradm/) cli:
If you want to enable the fluid addon for a specific managed cluster, you can change the `.spec.installStrategy` in the
clusterManagementAddon to `type: Manual`, then apply a managedclusteraddon to enable the fluid for a managed cluster(eg
cluster1) by the tool [clusteradm](https://github.com/open-cluster-management-io/clusteradm/) cli:

```
clusteradm addon enable --names=fluid --clusters=cluster1
Expand Down Expand Up @@ -59,6 +67,18 @@ fluidapp-controller-6c59d668cf-pxhjc 1/1 Running 0 16m

## Verify the fluid addon is functioning

### As a Managed cluster admin

Switch context to the Managed cluster.

Please refer to the [Get Started of the fluid doc to crate a dataset](https://github.com/fluid-cloudnative/fluid/blob/v0.9.2/docs/en/userguide/get_started.md#create-a-dataset) to verify that the fluid is functioning properly.

### As a Hub cluster admin

Switch context to the Hub cluster. Distribute fluid resources by manifestworks to the managed cluster.

```
# clusteradm create work dataset-demo -c cluster1 -f quick-start/dataset.yaml
# clusteradm create work runtime-demo -c cluster1 -f quick-start/runtime.yaml
# clusteradm create work app-demo -c cluster1 -f quick-start/app.yaml
```
12 changes: 12 additions & 0 deletions fluid-addon/deploy/addon/addon-deployment-config-gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: AddOnDeploymentConfig
metadata:
name: fluid-gke-config
namespace: default
spec:
agentInstallNamespace: fluid-system
customizedVariables:
- name: RUNTIME_MOUNT_PATH
value: /tmp/runtime-mnt
- name: CRITICAL_FUSE_POD
value: "false"
12 changes: 12 additions & 0 deletions fluid-addon/deploy/addon/addon-deployment-config-ocp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: AddOnDeploymentConfig
metadata:
name: fluid-ocp-config
namespace: default
spec:
agentInstallNamespace: fluid-system
customizedVariables:
- name: RUNTIME_MOUNT_PATH
value: /tmp/runtime-mnt
- name: CRITICAL_FUSE_POD
value: "true"
12 changes: 12 additions & 0 deletions fluid-addon/deploy/addon/addon-deployment-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: AddOnDeploymentConfig
metadata:
name: fluid-config
namespace: default
spec:
agentInstallNamespace: fluid-system
customizedVariables:
- name: RUNTIME_MOUNT_PATH
value: /runtime-mnt
- name: CRITICAL_FUSE_POD
value: "true"
Loading

0 comments on commit d1d0c25

Please sign in to comment.