Skip to content

Commit

Permalink
add direct CSI docs (#175)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
  • Loading branch information
harshavardhana and dvaldivia committed Jul 20, 2020
1 parent accb529 commit f605063
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MinIO-Operator brings native MinIO, [MCS](https://github.com/minio/mcs), and [KE

- Kubernetes version v1.17.0 and above for compatibility. MinIO Operator uses `k8s/client-go` v0.18.0.
- `kubectl` configured to refer to a Kubernetes cluster.
- Create the required PVs as [explained here](https://github.com/minio/minio-operator/blob/master/docs/creating-pv-manually.md).
- Create the required PVs using [direct CSI driver](https://github.com/minio/minio-operator/blob/master/docs/using-direct-csi.md).
- Optional: `kustomize` installed as [explained here](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md#installation).

### Create Operator Deployment
Expand Down
48 changes: 0 additions & 48 deletions docs/creating-pv-manually.md

This file was deleted.

38 changes: 38 additions & 0 deletions docs/using-direct-csi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Using Direct CSI Driver [![Slack](https://slack.min.io/slack?type=svg)](https://slack.min.io) [![Docker Pulls](https://img.shields.io/docker/pulls/minio/k8s-operator.svg?maxAge=604800)](https://hub.docker.com/r/minio/k8s-operator)

## Install Direct CSI Driver

### Set the environment variables

```sh
cat << EOF > default.env
DIRECT_CSI_DRIVER_PATHS=/var/lib/direct-csi-driver/data{1...4}
DIRECT_CSI_DRIVER_COMMON_CONTAINER_ROOT=/var/lib/direct-csi-driver
DIRECT_CSI_DRIVER_COMMON_HOST_ROOT=/var/lib/direct-csi-driver
EOF

export $(cat default.env)
```

### Create the namespace for the driver
```
kubectl apply -k github.com/minio/direct-csi-driver
```

### Utilize the CSI with MinIO operator

```yaml
## This VolumeClaimTemplate is used across all the volumes provisioned for MinIO cluster.
## Please do not change the volumeClaimTemplate field while expanding the cluster, this may
## lead to unbound PVCs and missing data
volumeClaimTemplate:
metadata:
name: direct-csi-driver-min-io-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Ti
storageClassName: direct.csi.driver.min.io # This field references the existing StorageClass
```

0 comments on commit f605063

Please sign in to comment.