Skip to content

Commit 3d4d44a

Browse files
committed
Merge branch 'v0.3.0' into 'master'
cvmfs-csi v0.3.0 See merge request cloud-infrastructure/cvmfs-csi!6
2 parents 1ff1bd0 + c3d32fe commit 3d4d44a

File tree

13,303 files changed

+65367
-3191392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

13,303 files changed

+65367
-3191392
lines changed

Gopkg.lock

Lines changed: 183 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[[constraint]]
2+
name = "github.com/container-storage-interface/spec"
3+
version = "~0.3.0"
4+
5+
[[constraint]]
6+
branch = "master"
7+
name = "github.com/kubernetes-csi/drivers"
8+
9+
[[constraint]]
10+
branch = "master"
11+
name = "github.com/golang/glog"
12+
13+
[[override]]
14+
revision = "5db89f0ca68677abc5eefce8f2a0a772c98ba52d"
15+
name = "github.com/docker/distribution"
16+
17+
[[constraint]]
18+
name = "google.golang.org/grpc"
19+
version = "1.10.0"
20+
21+
[[constraint]]
22+
version = "kubernetes-1.10.0-beta.1"
23+
name = "k8s.io/apimachinery"
24+
25+
[[constraint]]
26+
name = "k8s.io/kubernetes"
27+
version = "v1.10.0-beta.1"
28+
29+
[[override]]
30+
version = "kubernetes-1.10.0-beta.1"
31+
name = "k8s.io/api"
32+
33+
[[override]]
34+
name = "github.com/golang/protobuf"
35+
version = "1.1.0"
36+
37+
[prune]
38+
go-tests = true
39+
unused-packages = true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: all cvmfsplugin
22

33
NAME=csi-cvmfsplugin
4-
IMAGE_VERSION=v0.2.0
4+
IMAGE_VERSION=v0.3.0
55

66
all: cvmfsplugin
77

README.md

Lines changed: 80 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,42 @@
22

33
csi-cvmfs provides read-only mounting of CVMFS volumes in CSI-enabled container orchestrators.
44

5-
## Compiling
5+
## Building
66

77
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.
88

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:
23-
9+
Building a binary:
2410
```bash
25-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-attacher-rbac.yaml
26-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-attacher.yaml
11+
$ make cvmfsplugin
2712
```
28-
```bash
29-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-provisioner-rbac.yaml
30-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-provisioner.yaml
13+
14+
Building a Docker image:
15+
```
16+
$ make image
3117
```
3218

33-
Deploy the driver-registrar sidecar container and the csi-cvmfsplugin as DaemonSet:
19+
## Configuration
3420

35-
```bash
36-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-rbac.yaml
37-
$ kubectl create -f deploy/kubernetes/csi-cvmfsplugin-.yaml
38-
```
21+
**Available command line arguments:**
3922

40-
## StorageClass parameters
23+
Option | Default value | Description
24+
------ | ------------- | -----------
25+
`--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:**
4130

4231
Parameter | Required | Description
4332
--------- | -------- | -----------
44-
`repository` | yes | Name of the CVMFS repository
33+
`repository` | yes | Address of the CVMFS repository
4534
`tag` | no | `CVMFS_REPOSITORY_TAG`. Defaults to `trunk`
4635
`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.
5237

5338
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.
5439

40+
5541
**CVMFS configuration in Kubernetes**
5642
You can use Kubernetes [config map](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) to inject a custom `default.local` file.
5743

@@ -76,3 +62,64 @@ volumeMounts:
7662
mountPath: /etc/cvmfs/default.local
7763
subPath: cvmfs-override
7864
```
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.
83+
84+
**Deploy CSI sidecar containers:**
85+
86+
```bash
87+
$ kubectl create -f csi-cvmfsplugin-attacher.yaml
88+
$ kubectl create -f csi-cvmfsplugin-provisioner.yaml
89+
```
90+
91+
Deploys stateful sets for external-attacher and external-provisioner sidecar containers for CSI CernVM-FS.
92+
93+
**Deploy the CSI CernVM-FS driver:**
94+
95+
```bash
96+
$ kubectl create -f csi-cvmfsplugin.yaml
97+
```
98+
99+
Deploys a daemon set with two containers: CSI driver-registrar and the CSI CernVM-FS driver.
100+
101+
## Verifying the deployment in Kubernetes
102+
103+
After successfuly completing the steps above, you should see output similar to this:
104+
```bash
105+
$ kubectl get all
106+
NAME READY STATUS RESTARTS AGE
107+
pod/csi-cvmfsplugin-attacher-0 1/1 Running 0 1m
108+
pod/csi-cvmfsplugin-bhqck 2/2 Running 0 1m
109+
pod/csi-cvmfsplugin-provisioner-0 1/1 Running 0 1m
110+
111+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
112+
service/csi-cvmfsplugin-attacher ClusterIP 10.104.25.190 <none> 12345/TCP 1m
113+
service/csi-cvmfsplugin-provisioner ClusterIP 10.101.197.42 <none> 12345/TCP 1m
114+
115+
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
116+
daemonset.apps/csi-cvmfsplugin 1 1 1 1 1 <none> 1m
117+
118+
NAME DESIRED CURRENT AGE
119+
statefulset.apps/csi-cvmfsplugin-attacher 1 1 1m
120+
statefulset.apps/csi-cvmfsplugin-provisioner 1 1 1m
121+
122+
...
123+
```
124+
125+
You can try deploying a demo pod from `examples/` to test the deployment further.
File renamed without changes.

0 commit comments

Comments
 (0)