|
1 |
| -# CSINodeInfo Object |
| 1 | +# CSINode Object |
2 | 2 |
|
3 | 3 | ## Status
|
4 | 4 |
|
5 | 5 | * Kubernetes 1.12 - 1.13: Alpha
|
6 | 6 | * Kubernetes 1.14: Beta
|
7 | 7 |
|
8 |
| -## What is the CSINodeInfo object? |
| 8 | +## What is the CSINode object? |
9 | 9 |
|
10 |
| -CSI drivers generate node specific information. Instead of storing this in the Kubernetes `Node` API Object, a new CSI specific Kubernetes `CSINodeInfo` object was created. |
| 10 | +CSI drivers generate node specific information. Instead of storing this in the Kubernetes `Node` API Object, a new CSI specific Kubernetes `CSINode` object was created. |
11 | 11 |
|
12 | 12 | It serves the following purposes:
|
13 | 13 |
|
14 | 14 | 1. Mapping Kubernetes node name to CSI Node name,
|
15 |
| - * The CSI `GetNodeInfo` call returns the name by which the storage system refers to a node. Kubernetes must use this name in future `ControllerPublishVolume` calls. Therefore, when a new CSI driver is registered, Kubernetes stores the storage system node ID in the `CSINodeInfo` object for future reference. |
| 15 | + * The CSI `GetNodeInfo` call returns the name by which the storage system refers to a node. Kubernetes must use this name in future `ControllerPublishVolume` calls. Therefore, when a new CSI driver is registered, Kubernetes stores the storage system node ID in the `CSINode` object for future reference. |
16 | 16 | 2. Driver availability
|
17 | 17 | * A way for kubelet to communicate to the kube-controller-manager and kubernetes scheduler whether the driver is available (registered) on the node or not.
|
18 | 18 | 3. Volume topology
|
19 |
| - * The CSI `GetNodeInfo` call returns a set of keys/values labels identifying the topology of that node. Kubernetes uses this information to to do topology-aware provisioning (see [PVC Volume Binding Modes](https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode) for more details). It stores the key/values as labels on the Kubernetes node object. In order to recall which `Node` label keys belong to a specific CSI driver, the kubelet stores the keys in the `CSINodeInfo` object for future reference. |
20 |
| - |
| 19 | + * The CSI `GetNodeInfo` call returns a set of keys/values labels identifying the topology of that node. Kubernetes uses this information to to do topology-aware provisioning (see [PVC Volume Binding Modes](https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode) for more details). It stores the key/values as labels on the Kubernetes node object. In order to recall which `Node` label keys belong to a specific CSI driver, the kubelet stores the keys in the `CSINode` object for future reference. |
21 | 20 |
|
22 |
| -## What fields does the CSINodeInfo object have? |
| 21 | +## What fields does the CSINode object have? |
23 | 22 |
|
24 |
| -Here is an example of a v1alpha1 `CSINodeInfo` object: |
| 23 | +Here is an example of a v1beta1 `CSINode` object: |
25 | 24 |
|
26 | 25 | ```YAML
|
27 | 26 | apiVersion: storage.k8s.io/v1beta1
|
28 | 27 | kind: CSINodeInfo
|
29 | 28 | metadata:
|
30 | 29 | name: node1
|
31 | 30 | spec:
|
32 |
| - drivers: |
33 |
| - - name: mycsidriver.example.com |
34 |
| - available: true |
35 |
| - volumePluginMechanism: csi-plugin |
36 |
| -status: |
37 | 31 | drivers:
|
38 | 32 | - name: mycsidriver.example.com
|
39 | 33 | nodeID: storageNodeID1
|
40 | 34 | topologyKeys: ['mycsidriver.example.com/regions', "mycsidriver.example.com/zones"]
|
41 | 35 | ```
|
42 | 36 |
|
43 |
| -Where the fields mean: |
| 37 | +What the fields mean: |
44 | 38 |
|
45 |
| -- `csiDrivers` - list of CSI drivers running on the node and their properties. |
46 |
| -- `driver` - the CSI driver that this object refers to. |
| 39 | +- `drivers` - list of CSI drivers running on the node and their properties. |
| 40 | +- `name` - the CSI driver that this object refers to. |
47 | 41 | - `nodeID` - the assigned identifier for the node as determined by the driver.
|
48 | 42 | - `topologyKeys` - A list of topology keys assigned to the node as supported by the driver.
|
49 | 43 |
|
50 |
| -## What creates the CSINodeInfo object? |
| 44 | +## What creates the CSINode object? |
51 | 45 |
|
52 |
| -CSI drivers do not need to create the `CSINodeInfo` object directly. Instead they should use the [node-driver-registrar](node-driver-registrar.md) sidecar container. This sidecar container will interact with kubelet via the kubelet plugin registration mechanism to automatically populate the `CSINodeInfo` object on behalf of the the CSI driver. |
| 46 | +CSI drivers do not need to create the `CSINode` object directly. Instead they should use the [node-driver-registrar](node-driver-registrar.md) sidecar container. This sidecar container will interact with kubelet via the kubelet plugin registration mechanism to automatically populate the `CSINode` object on behalf of the the CSI driver. |
53 | 47 |
|
54 | 48 | ## Changes from Alpha to Beta
|
| 49 | + |
55 | 50 | ### CRD to Built in Type
|
56 |
| -During alpha development, the `CSINodeInfo` object was also defined as a [Custom Resource Definition](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition) (CRD). As part of the promotion to beta the object has been moved to the built-in Kubernetes API. |
| 51 | +The alpha object was called `CSINodeInfo`, whereas the beta object is called |
| 52 | +CSINode`. The alpha `CSINodeInfo` object was also defined as a [Custom Resource Definition](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition) (CRD). As part of the promotion to beta the object has been moved to the built-in Kubernetes API. |
57 | 53 |
|
58 | 54 | In the move from alpha to beta, the API Group for this object changed from `csi.storage.k8s.io/v1alpha1` to `storage.k8s.io/v1beta1`.
|
59 | 55 |
|
60 | 56 | There is no automatic update of existing CRDs and their CRs during Kubernetes update to the new build-in type.
|
61 | 57 |
|
62 | 58 | ### Enabling CSINodeInfo on Kubernetes
|
63 |
| -In Kubernetes v1.12 and v1.13, because the feature was alpha, it was disabled by default. To enable the use of `CSIDriver` on these versions, do the following: |
| 59 | +In Kubernetes v1.12 and v1.13, because the feature was alpha, it was disabled by default. To enable the use of `CSINodeInfo` on these versions, do the following: |
64 | 60 |
|
65 | 61 | 1. Ensure the feature gate is enabled with `--feature-gates=CSINodeInfo=true`
|
66 |
| -2. Either ensure the `CSIDriver` CRD is automatically installed via the [Kubernetes Storage CRD addon](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/storage-crds) OR manually install the `CSINodeInfo` CRD on the Kubernetes cluster with the following command: |
| 62 | +2. Either ensure the `CSIDriver` CRD is automatically installed via the [Kubernetes Storage CRD addon](https://github.com/kubernetes/kubernetes/tree/release-1.13/cluster/addons/storage-crds) OR manually install the `CSINodeInfo` CRD on the Kubernetes cluster with the following command: |
67 | 63 |
|
68 | 64 | ```
|
69 | 65 | $> kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/master/pkg/crd/manifests/csinodeinfo.yaml
|
|
0 commit comments