Skip to content

Commit f42ffb8

Browse files
committed
Update README
1 parent 53469c2 commit f42ffb8

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

README.md

+39-13
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22

33
The CSI external-snapshotter is part of Kubernetes implementation of [Container Storage Interface (CSI)](https://github.com/container-storage-interface/spec).
44

5-
The volume snapshot feature supports CSI v1.0 and it has been an Alpha feature in Kubernetes since v1.12.
5+
The volume snapshot feature supports CSI v1.0 and higher. It was introduced as an Alpha feature in Kubernetes v1.12 and has been promoted to an Beta feature in Kubernetes 1.17.
66

77
## Overview
88

99
CSI Snapshotter is an external controller that watches Kubernetes Snapshot CRD objects and triggers CreateSnapshot/DeleteSnapshot against a CSI endpoint. Full design can be found at Kubernetes proposal at [here](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/csi-snapshot.md)
1010

11+
With the promotion of Volume Snapshot to beta, the feature is now enabled by default on standard Kubernetes deployments instead of being opt-in.
12+
13+
The move of the Kubernetes Volume Snapshot feature to beta also means:
14+
* A revamp of volume snapshot APIs.
15+
* The CSI external-snapshotter sidecar is split into two controllers, a common snapshot controller and a CSI external-snapshotter sidecar.
16+
17+
1118
## Design
1219

1320
External snapshotter follows [controller](https://github.com/kubernetes/community/blob/master/contributors/devel/controllers.md) pattern and uses informers to watch for `VolumeSnapshot` and `VolumeSnapshotContent` create/update/delete events. It filters out these objects with `Snapshotter==<CSI driver name>` specified in the associated VolumeSnapshotClass object and then processes these events in workqueues with exponential backoff.
@@ -30,23 +37,30 @@ Snapshotter talks to CSI over socket (/run/csi/socket by default, configurable b
3037
* If the `VolumeSnapshotRef` is set to nil, skip this content since it is not bound to any snapshot object.
3138
* Otherwise, the controller verifies whether the content object is correctly bound to a snapshot object. In case the `VolumeSnapshotRef.UID` is set but it does not match its snapshot object or snapshot no long exists, the content object and its associated snapshot will be deleted.
3239

33-
## Usage
40+
## Deployment
3441

35-
### Running on command line
42+
The Volume Snapshot feature now depends on a new, common volume snapshot controller in addition to the volume snapshot CRDs. Both the volume snapshot controller and the CRDs are independent of any CSI driver. Regardless of the number CSI drivers deployed on the cluster, there must be only one instance of the volume snapshot controller running and one set of volume snapshot CRDs installed per cluster.
3643

37-
For debugging, it is possible to run snapshotter on command line. For example,
44+
Therefore, it is strongly recommended that Kubernetes distributors bundle and deploy the controller and CRDs as part of their Kubernetes cluster management process (independent of any CSI Driver).
3845

39-
```bash
40-
csi-snapshotter -kubeconfig ~/.kube/config -v 5 -csi-address /run/csi/socket
41-
```
46+
If your cluster does not come pre-installed with the correct components, you may manually install these components by executing the following steps.
4247

43-
### Running in a statefulset
48+
Install Snapshot Beta CRDs:
49+
* kubectl create -f config/crd
50+
* https://github.com/kubernetes-csi/external-snapshotter/tree/master/config/crd
51+
* Do this once per cluster
4452

45-
It is necessary to create a new service account and give it enough privileges to run the snapshotter. We provide .yaml files that deploy for use together with the hostpath example driver. A real production deployment must customize them:
53+
Install Common Snapshot Controller:
54+
* kubectl create -f deploy/kubernetes/snapshot-controller
55+
* https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/snapshot-controller
56+
* Do this once per cluster
57+
58+
Install CSI Driver:
59+
* Follow instructions provided by your CSI Driver vendor.
60+
* Here is an example to install the sample hostpath CSI driver
61+
* kubectl create -f deploy/kubernetes/csi-snapshotter
62+
* https://github.com/kubernetes-csi/external-snapshotter/tree/master/deploy/kubernetes/csi-snapshotter
4663

47-
```bash
48-
for i in $(find deploy/kubernetes -name '*.yaml'); do kubectl create -f $i; done
49-
```
5064

5165
### Running with Leader Election
5266

@@ -55,12 +69,24 @@ If you want to run external-snapshotter with higher availability, you can enable
5569
--leader-election=true
5670
```
5771

72+
### Upgrade from Alpha to Beta
73+
74+
The change from Alpha to Beta snapshot APIs is not backward compatible.
75+
76+
If you have already deployed Alpha snapshot APIs and controller and want to upgrade to Beta, you need to do the following:
77+
* Delete snapshots created using Alpha snapshot CRDs and controller.
78+
* Uninstall Alpha snapshot CRDs, controller, and CSI driver.
79+
* Install Beta snapshot CRDs, controller, and CSI driver.
80+
81+
5882
## Testing
5983

6084
Running Unit Tests:
6185

6286
```bash
63-
go test -timeout 30s github.com/kubernetes-csi/external-snapshotter/pkg/controller
87+
go test -timeout 30s github.com/kubernetes-csi/external-snapshotter/pkg/common-controller
88+
89+
go test -timeout 30s github.com/kubernetes-csi/external-snapshotter/pkg/sidecar-controller
6490
```
6591

6692
## Dependency Management

0 commit comments

Comments
 (0)