From fd19cb8ed036309727af7d9c00928f80c1fe411c Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Fri, 1 Mar 2019 16:07:33 -0800 Subject: [PATCH 1/7] Placeholder docs for CSI Migration feature Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 8e3e887d7af9c..7628da3b39c9c 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -1235,6 +1235,20 @@ Learn how to For more information on how to develop a CSI driver, refer to the [kubernetes-csi documentation](https://kubernetes-csi.github.io/docs/) +#### Migrating to CSI drivers from in-tree plugins + +{{< feature-state for_k8s_version="v1.14" state="alpha" >}} + +The CSI Migration feature, when enabled, directs all operations against existing in-tree +plugins to corresponding CSI plugins, if installed. The feature implements the +necessary translation logic and shims to re-route the operations in a seamless fashion. +As a result, operators do not have to make any configuration changes to existing +Storage Classes, PVs or PVCs (referring to in-tree plugins) when transitioning to +a CSI driver that supersedes an in-tree plugin. + +In-tree plugins that support CSI Migration and have a corresponding CSI driver implemented +are listed in the "Types of Volumes" section above. + ### Flexvolume {#flexVolume} Flexvolume is an out-of-tree plugin interface that has existed in Kubernetes From 95732415a61e2b6d3e72c26c8dd1dcafbd6e7855 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Mon, 11 Mar 2019 11:11:29 -0700 Subject: [PATCH 2/7] Address CR comments and update feature gates Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 15 +++++++++------ .../command-line-tools-reference/feature-gates.md | 8 ++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 7628da3b39c9c..db3bc7a3c9a2d 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -1239,12 +1239,15 @@ documentation](https://kubernetes-csi.github.io/docs/) {{< feature-state for_k8s_version="v1.14" state="alpha" >}} -The CSI Migration feature, when enabled, directs all operations against existing in-tree -plugins to corresponding CSI plugins, if installed. The feature implements the -necessary translation logic and shims to re-route the operations in a seamless fashion. -As a result, operators do not have to make any configuration changes to existing -Storage Classes, PVs or PVCs (referring to in-tree plugins) when transitioning to -a CSI driver that supersedes an in-tree plugin. +The CSI Migration feature, when enabled, directs operations against existing in-tree +plugins to corresponding CSI plugins (which are expected to be installed and configured). +The feature implements the necessary translation logic and shims to re-route the +operations in a seamless fashion. As a result, operators do not have to make any +configuration changes to existing Storage Classes, PVs or PVCs (referring to +in-tree plugins) when transitioning to a CSI driver that supersedes an in-tree plugin. + +In the alpha state, the operations and features that are supported include +provisioning/de-provision, attach/detach and mount/unmount of volumes. In-tree plugins that support CSI Migration and have a corresponding CSI driver implemented are listed in the "Types of Volumes" section above. diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index ff6cb43dbe647..6d15466920922 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -59,6 +59,10 @@ different Kubernetes components. | `CSIBlockVolume` | `true` | Beta | 1.14 | | | `CSIDriverRegistry` | `false` | Alpha | 1.12 | 1.13 | | `CSIDriverRegistry` | `true` | Beta | 1.14 | | +| `CSIMigration` | `false` | Alpha | 1.14 | | +| `CSIMigrationAWS` | `false` | Alpha | 1.14 | | +| `CSIMigrationGCE` | `false` | Alpha | 1.14 | | +| `CSIMigrationOpenStack` | `false` | Alpha | 1.14 | | | `CSINodeInfo` | `false` | Alpha | 1.12 | 1.13 | | `CSINodeInfo` | `true` | Beta | 1.14 | | | `CSIPersistentVolume` | `false` | Alpha | 1.9 | 1.9 | @@ -216,6 +220,10 @@ Each feature gate is designed for enabling/disabling a specific feature: - `CRIContainerLogRotation`: Enable container log rotation for cri container runtime. - `CSIBlockVolume`: Enable external CSI volume drivers to support block storage. See the [`csi` raw block volume support](/docs/concepts/storage/volumes/#csi-raw-block-volume-support) documentation for more details. - `CSIDriverRegistry`: Enable all logic related to the CSIDriver API object in csi.storage.k8s.io. +- `CSIMigration`: Enables shims and translation logic to route volume operations from in-tree plugins to corresponding pre-installed CSI plugins +- `CSIMigrationAWS`: Enables shims and translation logic to route volume operations from the AWS-EBS in-tree plugin to EBS CSI plugin +- `CSIMigrationGCE`: Enables shims and translation logic to route volume operations from the GCE-PD in-tree plugin to PD CSI plugin +- `CSIMigrationOpenStack`: Enables shims and translation logic to route volume operations from the Cinder in-tree plugin to Cinder CSI plugin - `CSINodeInfo`: Enable all logic related to the CSINodeInfo API object in csi.storage.k8s.io. - `CSIPersistentVolume`: Enable discovering and mounting volumes provisioned through a [CSI (Container Storage Interface)](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/container-storage-interface.md) From 070f3746dd240caba98fb4077962efec25162a1b Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Mon, 11 Mar 2019 11:19:31 -0700 Subject: [PATCH 3/7] Add mappings for CSI plugins Signed-off-by: Deep Debroy --- .../reference/command-line-tools-reference/feature-gates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index 6d15466920922..4e9842b580fd0 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -221,7 +221,7 @@ Each feature gate is designed for enabling/disabling a specific feature: - `CSIBlockVolume`: Enable external CSI volume drivers to support block storage. See the [`csi` raw block volume support](/docs/concepts/storage/volumes/#csi-raw-block-volume-support) documentation for more details. - `CSIDriverRegistry`: Enable all logic related to the CSIDriver API object in csi.storage.k8s.io. - `CSIMigration`: Enables shims and translation logic to route volume operations from in-tree plugins to corresponding pre-installed CSI plugins -- `CSIMigrationAWS`: Enables shims and translation logic to route volume operations from the AWS-EBS in-tree plugin to EBS CSI plugin +- `CSIMigrationAWS`: Enables shims and translation logic to route volume operations from the AWS-EBS in-tree plugin to EBS CSI plugin - `CSIMigrationGCE`: Enables shims and translation logic to route volume operations from the GCE-PD in-tree plugin to PD CSI plugin - `CSIMigrationOpenStack`: Enables shims and translation logic to route volume operations from the Cinder in-tree plugin to Cinder CSI plugin - `CSINodeInfo`: Enable all logic related to the CSINodeInfo API object in csi.storage.k8s.io. From 48f8fedd4cf8691586b658a33624b861d512729d Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Tue, 12 Mar 2019 17:54:59 -0700 Subject: [PATCH 4/7] Add sections for AWS and GCE PD migration Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 17 +++++++++++++++++ .../feature-gates.md | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index db3bc7a3c9a2d..415449e622b43 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -148,6 +148,12 @@ spec: fsType: ext4 ``` +#### CSI Migration + +{{< feature-state for_k8s_version="v1.14" state="alpha" >}} + +To enable the feature, set `CSIMigration` and `CSIMigrationAWS` alpha feature gates to `true`. Once enabled, this feature shims all plugin operations from in-tree `awsElasticBlockStore` plugin to [AWS EBS CSI Driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver). To use this feature, AWS EBS CSI driver must be installed on the cluster. + ### azureDisk {#azuredisk} A `azureDisk` is used to mount a Microsoft Azure [Data Disk](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-about-disks-vhds/) into a Pod. @@ -401,6 +407,17 @@ spec: fsType: ext4 ``` +#### CSI Migration + +{{< feature-state for_k8s_version="v1.14" state="alpha" >}} + +The CSI Migration feature for GCE PD, when enabled, shims all plugin operations +from the existing in-tree plugin to the `pd.csi.storage.gke.io` Container +Storage Interface (CSI) Driver. In order to use this feature, the [GCE PD CSI +Driver](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver) +must be installed on the cluster and the `CSIMigration` and `CSIMigrationGCE` +Alpha features must be enabled. + ### gitRepo (deprecated) {#gitrepo} {{< warning >}} diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates.md b/content/en/docs/reference/command-line-tools-reference/feature-gates.md index 4e9842b580fd0..6d15466920922 100644 --- a/content/en/docs/reference/command-line-tools-reference/feature-gates.md +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates.md @@ -221,7 +221,7 @@ Each feature gate is designed for enabling/disabling a specific feature: - `CSIBlockVolume`: Enable external CSI volume drivers to support block storage. See the [`csi` raw block volume support](/docs/concepts/storage/volumes/#csi-raw-block-volume-support) documentation for more details. - `CSIDriverRegistry`: Enable all logic related to the CSIDriver API object in csi.storage.k8s.io. - `CSIMigration`: Enables shims and translation logic to route volume operations from in-tree plugins to corresponding pre-installed CSI plugins -- `CSIMigrationAWS`: Enables shims and translation logic to route volume operations from the AWS-EBS in-tree plugin to EBS CSI plugin +- `CSIMigrationAWS`: Enables shims and translation logic to route volume operations from the AWS-EBS in-tree plugin to EBS CSI plugin - `CSIMigrationGCE`: Enables shims and translation logic to route volume operations from the GCE-PD in-tree plugin to PD CSI plugin - `CSIMigrationOpenStack`: Enables shims and translation logic to route volume operations from the Cinder in-tree plugin to Cinder CSI plugin - `CSINodeInfo`: Enable all logic related to the CSINodeInfo API object in csi.storage.k8s.io. From 9bf50fb58df2a1e99c987ee14e2c092626cb3071 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Tue, 12 Mar 2019 18:01:04 -0700 Subject: [PATCH 5/7] Add docs for Cinder and CSI Migration info Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 415449e622b43..78af6edead0ab 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -70,6 +70,7 @@ Kubernetes supports several types of Volumes: * [azureDisk](#azuredisk) * [azureFile](#azurefile) * [cephfs](#cephfs) + * [cinder](#cinder) * [configMap](#configmap) * [csi](#csi) * [downwardAPI](#downwardapi) @@ -182,6 +183,43 @@ You must have your own Ceph server running with the share exported before you ca See the [CephFS example](https://github.com/kubernetes/examples/tree/{{< param "githubbranch" >}}/staging/volumes/cephfs/) for more details. +### cinder {#cinder} + +{{< note >}} +Prerequisite: Kubernetes with OpenStack Cloud Provider configured. For cloudprovider +configuration please refer [cloud provider openstack](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/#openstack). +{{< /note >}} + +`cinder` is used to mount OpenStack Cinder Volume into your Pod. + +#### Cinder Volume Example configuration + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: test-cinder +spec: + containers: + - image: k8s.gcr.io/test-webserver + name: test-cinder-container + volumeMounts: + - mountPath: /test-cinder + name: test-volume + volumes: + - name: test-volume + # This OpenStack volume must already exist. + cinder: + volumeID: + fsType: ext4 +``` + +#### CSI Migration + +{{< feature-state for_k8s_version="v1.14" state="alpha" >}} + +To enable the feature, set `CSIMigration` and `CSIMigrationOpenStack` alpha feature gates to `true`. Once enabled, this feature shims all plugin operations from in-tree `cinder` plugin to [Cinder CSI Driver](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-cinder-csi-plugin.md). To use this feature, Cinder CSI driver must be installed on the cluster. + ### configMap {#configmap} The [`configMap`](/docs/tasks/configure-pod-container/configure-pod-configmap/) resource From 7eb44b871aaf86bf337daced8454cf299b517116 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Tue, 12 Mar 2019 18:04:51 -0700 Subject: [PATCH 6/7] Clarify scope to volumes with file system Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 78af6edead0ab..8b9db42386350 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -1302,7 +1302,7 @@ configuration changes to existing Storage Classes, PVs or PVCs (referring to in-tree plugins) when transitioning to a CSI driver that supersedes an in-tree plugin. In the alpha state, the operations and features that are supported include -provisioning/de-provision, attach/detach and mount/unmount of volumes. +provisioning/delete, attach/detach and mount/unmount of volumes with `volumeMode` set to `filesystem` In-tree plugins that support CSI Migration and have a corresponding CSI driver implemented are listed in the "Types of Volumes" section above. From fccebd63275d97eda2b0d6b8ffab97ac658d7e87 Mon Sep 17 00:00:00 2001 From: Deep Debroy Date: Thu, 14 Mar 2019 10:52:21 -0700 Subject: [PATCH 7/7] Change the format of EBS and Cinder CSI Migration sections to follow the GCE template Signed-off-by: Deep Debroy --- content/en/docs/concepts/storage/volumes.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/content/en/docs/concepts/storage/volumes.md b/content/en/docs/concepts/storage/volumes.md index 8b9db42386350..13871e8bb955d 100644 --- a/content/en/docs/concepts/storage/volumes.md +++ b/content/en/docs/concepts/storage/volumes.md @@ -153,7 +153,12 @@ spec: {{< feature-state for_k8s_version="v1.14" state="alpha" >}} -To enable the feature, set `CSIMigration` and `CSIMigrationAWS` alpha feature gates to `true`. Once enabled, this feature shims all plugin operations from in-tree `awsElasticBlockStore` plugin to [AWS EBS CSI Driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver). To use this feature, AWS EBS CSI driver must be installed on the cluster. +The CSI Migration feature for awsElasticBlockStore, when enabled, shims all plugin operations +from the existing in-tree plugin to the `ebs.csi.aws.com` Container +Storage Interface (CSI) Driver. In order to use this feature, the [AWS EBS CSI +Driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) +must be installed on the cluster and the `CSIMigration` and `CSIMigrationAWS` +Alpha features must be enabled. ### azureDisk {#azuredisk} @@ -218,7 +223,12 @@ spec: {{< feature-state for_k8s_version="v1.14" state="alpha" >}} -To enable the feature, set `CSIMigration` and `CSIMigrationOpenStack` alpha feature gates to `true`. Once enabled, this feature shims all plugin operations from in-tree `cinder` plugin to [Cinder CSI Driver](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-cinder-csi-plugin.md). To use this feature, Cinder CSI driver must be installed on the cluster. +The CSI Migration feature for Cinder, when enabled, shims all plugin operations +from the existing in-tree plugin to the `cinder.csi.openstack.org` Container +Storage Interface (CSI) Driver. In order to use this feature, the [Openstack Cinder CSI +Driver](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-cinder-csi-plugin.md) +must be installed on the cluster and the `CSIMigration` and `CSIMigrationOpenStack` +Alpha features must be enabled. ### configMap {#configmap}