Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fluid addon #15

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading