You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-33Lines changed: 80 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,56 +2,42 @@
2
2
3
3
csi-cvmfs provides read-only mounting of CVMFS volumes in CSI-enabled container orchestrators.
4
4
5
-
## Compiling
5
+
## Building
6
6
7
7
The CSI CernVM-FS driver can be compiled in a form of a binary file or an image. When compiled as a binary, the resulting file gets stored in `_output` directory. When compiled as an image, it gets stored in local Docker image store.
8
8
9
-
Building a binary file: `$ make cvmfsplugin`
10
-
Building a Docker image: `$ make image`
11
-
12
-
## Deployment
13
-
14
-
**Kubernetes 1.10**
15
-
16
-
Enable CSI in Kubernetes:
17
-
18
-
- kube-apiserver must be launched with `--feature-gates=CSIPersistentVolume=true,MountPropagation=true` and `--runtime-config=storage.k8s.io/v1alpha1=true`
19
-
- kube-controller-manager must be launched with `--feature-gates=CSIPersistentVolume=true`
20
-
- kubelet must be launched with `--feature-gates=CSIPersistentVolume=true,MountPropagation=true`
21
-
22
-
Deploy the external attacher and provisioner sidecar containers as StatefulSets:
`--endpoint` | `unix://tmp/csi.sock` | CSI endpoint, must be a UNIX socket
26
+
`--drivername` | `csi-cvmfsplugin` | name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value)
27
+
`--nodeid` | _empty_ | This node's ID
28
+
29
+
**Available volume parameters:**
41
30
42
31
Parameter | Required | Description
43
32
--------- | -------- | -----------
44
-
`repository` | yes | Name of the CVMFS repository
33
+
`repository` | yes | Address of the CVMFS repository
45
34
`tag` | no | `CVMFS_REPOSITORY_TAG`. Defaults to `trunk`
46
35
`hash` | no | `CVMFS_REPOSITORY_HASH`
47
-
`proxy` | no | `CVMFS_HTTP_PROXY`. Defaults to the value sourced from `default.local`. See [CVMFS configuration](#cvmfs-configuration)
48
-
49
-
Note that specifying both `tag` and `hash` is not allowed.
50
-
51
-
### CVMFS configuration
36
+
`proxy` | no | `CVMFS_HTTP_PROXY`. Defaults to the value sourced from `default.local`. See instructions below.
52
37
53
38
By default, csi-cvmfs is distributed with `default.local` containing CERN defaults. You can override those at runtime by overwriting `/etc/cvmfs/default.local`, which is then sourced into any later CVMFS client configs used for mounting.
54
39
40
+
55
41
**CVMFS configuration in Kubernetes**
56
42
You can use Kubernetes [config map](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) to inject a custom `default.local` file.
57
43
@@ -76,3 +62,64 @@ volumeMounts:
76
62
mountPath: /etc/cvmfs/default.local
77
63
subPath: cvmfs-override
78
64
```
65
+
66
+
## Deployment with Kubernetes
67
+
68
+
Requires Kubernetes 1.11+
69
+
70
+
Your Kubernetes cluster must allow privileged pods (i.e. `--allow-privileged` flag must be set to true for both the API server and the kubelet). Moreover, as stated in the [mount propagation docs](https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation), the Docker daemon of the cluster nodes must allow shared mounts.
71
+
72
+
YAML manifests are located in `deploy/kubernetes`.
73
+
74
+
**Deploy RBACs for sidecar containers and node plugins:**
75
+
76
+
```bash
77
+
$ kubectl create -f csi-attacher-rbac.yaml
78
+
$ kubectl create -f csi-provisioner-rbac.yaml
79
+
$ kubectl create -f csi-nodeplugin-rbac.yaml
80
+
```
81
+
82
+
Those manifests deploy service accounts, cluster roles and cluster role bindings.
0 commit comments