Skip to content

Commit ae5d331

Browse files
authored
Merge pull request #48979 from lpettyjo/OSDOCS-3785
OSDOCS-3785:Google Filestore CSI Driver Operator
2 parents fc07bad + 04e1a84 commit ae5d331

7 files changed

+195
-3
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,8 @@ Topics:
13821382
File: persistent-storage-csi-azure-stack-hub
13831383
- Name: GCP PD CSI Driver Operator
13841384
File: persistent-storage-csi-gcp-pd
1385+
- Name: GCP Filestore CSI Driver Operator
1386+
File: persistent-storage-csi-google-cloud-file
13851387
- Name: IBM VPC Block CSI Driver Operator
13861388
File: persistent-storage-csi-ibm-vpc-block
13871389
- Name: OpenStack Cinder CSI Driver Operator

modules/persistent-storage-csi-drivers-supported.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ The following table describes the CSI drivers that are installed with {product-t
1919
|AliCloud Disk | ✅ | - | ✅
2020
|AWS EBS | ✅ | - | ✅
2121
|AWS EFS | - | - | -
22-
|Google Cloud Platform (GCP) persistent disk (PD)| ✅ | - | ✅
22+
|Google Compute Platform (GCP) persistent disk (PD)| ✅ | - | ✅
23+
|GCP Filestore | ✅ | ✅ | ✅
2324
|IBM VPC Block | ✅^[3]^ | - | ✅^[3]^
2425
|Microsoft Azure Disk | ✅ | ✅ | ✅
2526
|Microsoft Azure Stack Hub | ✅ | ✅ | ✅
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_csi-google_cloud_file.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="persistent-storage-csi-olm-operator-install_{context}"]
7+
= Installing the GCP Filestore CSI Driver Operator
8+
9+
The Google Compute Platform (GCP) Filestore Container Storage Interface (CSI) Driver Operator is not installed in {product-title} by default. Use the following procedure to install the GCP Filestore CSI Driver Operator in your cluster.
10+
11+
.Prerequisites
12+
* Access to the {product-title} web console.
13+
14+
.Procedure
15+
To install the GCP Filestore CSI Driver Operator from the web console:
16+
17+
. Log in to the web console.
18+
19+
. Enable the Filestore API in the GCE project by running the following command:
20+
+
21+
[source, command]
22+
----
23+
$ gcloud services enable file.googleapis.com --project <my_gce_project> <1>
24+
----
25+
<1> Replace `<my_gce_project>` with your Google Cloud project.
26+
+
27+
You can also do this using Google Cloud web console.
28+
29+
. Install the GCP Filestore CSI Operator:
30+
31+
.. Click *Operators* -> *OperatorHub*.
32+
33+
.. Locate the GCP Filestore CSI Operator by typing *GCP Filestore* in the filter box.
34+
35+
.. Click the *GCP Filestore CSI Driver Operator* button.
36+
37+
.. On the *GCP Filestore CSI Driver Operator* page, click *Install*.
38+
39+
.. On the *Install Operator* page, ensure that:
40+
+
41+
* *All namespaces on the cluster (default)* is selected.
42+
* *Installed Namespace* is set to *openshift-cluster-csi-drivers*.
43+
44+
.. Click *Install*.
45+
+
46+
After the installation finishes, the GCP Filestore CSI Operator is listed in the *Installed Operators* section of the web console.
47+
48+
. Install the GCP Filestore CSI Driver:
49+
50+
.. Click *administration* → *CustomResourceDefinitions* → *ClusterCSIDriver*.
51+
52+
.. On the *Instances* tab, click *Create ClusterCSIDriver*.
53+
+
54+
Use the following YAML file:
55+
+
56+
[source, yaml]
57+
----
58+
apiVersion: operator.openshift.io/v1
59+
kind: ClusterCSIDriver
60+
metadata:
61+
name: filestore.csi.storage.gke.io
62+
spec:
63+
managementState: Managed
64+
----
65+
66+
.. Click *Create*.
67+
+
68+
.. Wait for the following Conditions to change to a "true" status:
69+
70+
* GCPFilestoreDriverCredentialsRequestControllerAvailable
71+
72+
* GCPFilestoreDriverNodeServiceControllerAvailable
73+
74+
* GCPFilestoreDriverControllerServiceControllerAvailable
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-google-cloud-file.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="persistent-storage-csi-google-cloud-file-create-sc_{context}"]
7+
= Creating a storage class for GCP Filestore Storage
8+
9+
After installing the operator, you should create a storage class for dynamic provisioning of Google Compute Platform (GCP) Filestore volumes.
10+
11+
.Prerequisites
12+
* You are logged in to the running {product-title} cluster.
13+
14+
.Procedure
15+
To create a storage class:
16+
17+
. Create a storage class using the following example YAML file:
18+
+
19+
[source,yaml]
20+
.Example YAML file
21+
--
22+
kind: StorageClass
23+
apiVersion: storage.k8s.io/v1
24+
metadata:
25+
name: filestore-csi
26+
provisioner: filestore.csi.storage.gke.io
27+
parameters:
28+
network: network-name <1>
29+
allowVolumeExpansion: true
30+
volumeBindingMode: WaitForFirstConsumer
31+
--
32+
<1> Specify the name of the GCP virtual private cloud (VPC) network where Filestore instances should be created in.
33+
34+
. Specify the name of the VPC network where Filestore instances should be created in.
35+
+
36+
It is recommended to specify the VPC network that the Filestore instances should be created in. If no VPC network is specified, the Container Storage Interface (CSI) driver tries to create the instances in the default VPC network of the project.
37+
On IPI installations, the VPC network name is typically the cluster name with the suffix "-network". However, on UPI installations, the VPC network name can be any value chosen by the user.
38+
+
39+
You can find out the VPC network name by inspecting the `MachineSets` objects with the following command:
40+
+
41+
[source, command]
42+
----
43+
$ oc -n openshift-machine-api get machinesets -o yaml | grep "network:"
44+
- network: gcp-filestore-network
45+
(...)
46+
----
47+
In this example, the VPC network name in this cluster is "gcp-filestore-network".
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-google-cloud-file.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="persistent-storage-csi-gcp-cloud-file-delete-instances_{context}"]
7+
= Destroying clusters and GCP Filestore
8+
9+
Typically, if you destroy a cluster, the {product-title} installer deletes all of the cloud resources that belong to that cluster. However, when a cluster is destroyed, Google Compute Platform (GCP) Filestore instances are not automatically deleted, so you must manually delete all persistent volume claims (PVCs) that use the Filestore storage class before destroying the cluster.
10+
11+
.Procedure
12+
To delete all GCP Filestore PVCs:
13+
14+
. List all PVCs that were created using the storage class `filestore-csi`:
15+
+
16+
[source, command]
17+
----
18+
$ oc get pvc -o json -A | jq -r '.items[] | select(.spec.storageClassName == "filestore-csi")
19+
----
20+
21+
. Delete all of the PVCs listed by the previous command:
22+
+
23+
[source, command]
24+
----
25+
$ oc delete <pvc-name> <1>
26+
----
27+
<1> Replace <pvc-name> with the name of any PVC that you need to delete.

modules/storage-persistent-storage-pv.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
4848
- Cinder
4949
- Fibre Channel
5050
endif::openshift-enterprise,openshift-webscale,openshift-origin[]
51-
- GCE Persistent Disk
51+
- GCP Persistent Disk
52+
- GCP Filestore
5253
ifdef::openshift-enterprise,openshift-webscale,openshift-origin,openshift-aro[]
5354
- HostPath
5455
- iSCSI
@@ -146,7 +147,8 @@ ifdef::openshift-enterprise,openshift-webscale,openshift-origin[]
146147
//|CephFS | ✅ | ✅ | ✅
147148
|Cinder | ✅ | - | -
148149
|Fibre Channel | ✅ | ✅ | -
149-
|GCE Persistent Disk | ✅ | - | -
150+
|GCP Persistent Disk | ✅ | - | -
151+
|GCP Filestore | ✅ | ✅ | ✅
150152
//|GlusterFS | ✅ | ✅ | ✅
151153
|HostPath | ✅ | - | -
152154
|iSCSI | ✅ | ✅ | -
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[id="persistent-storage-csi-google-cloud-file"]
2+
= Google Compute Platform Filestore CSI Driver Operator
3+
include::_attributes/common-attributes.adoc[]
4+
:context: persistent-storage-csi-google-cloud-file
5+
6+
toc::[]
7+
8+
[id="persistent-storage-csi-google-cloud-file-overview"]
9+
== Overview
10+
11+
{product-title} is capable of provisioning persistent volumes (PVs) using the Container Storage Interface (CSI) driver for Google Compute Platform (GCP) Filestore Storage.
12+
13+
:FeatureName: GCP Filestore CSI Driver Operator
14+
include::snippets/technology-preview.adoc[leveloffset=+1]
15+
16+
Familiarity with xref:../../storage/understanding-persistent-storage.adoc#understanding-persistent-storage[persistent storage] and xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[configuring CSI volumes] is recommended when working with a CSI Operator and driver.
17+
18+
To create CSI-provisioned PVs that mount to GCP Filestore Storage assets, you install the GCP Filestore CSI Driver Operator and the GCP Filestore CSI driver in the `openshift-cluster-csi-drivers` namespace.
19+
20+
* The _GCP Filestore CSI Driver Operator_ does not provide a storage class by default, but xref:../../storage/container_storage_interface/persistent-storage-csi-google-cloud-file.adoc#persistent-storage-csi-google-cloud-file-create-sc_persistent-storage-csi-google-cloud-file[you can create one if needed]. The GCP Filestore CSI Driver Operator supports dynamic volume provisioning by allowing storage volumes to be created on demand, eliminating the need for cluster administrators to pre-provision storage.
21+
22+
* The _GCP Filestore CSI driver_ enables you to create and mount GCP Filestore PVs.
23+
24+
include::modules/persistent-storage-csi-about.adoc[leveloffset=+1]
25+
26+
include::modules/persistent-storage-csi-gcp-file-install.adoc[leveloffset=+1]
27+
28+
[role="_additional-resources"]
29+
.Additional resources
30+
* link:https://cloud.google.com/endpoints/docs/openapi/enable-api[Enabling an API in your Google Cloud].
31+
* link:https://support.google.com/googleapi/answer/6158841?hl=en[Enablilng an API using the Google Cloud web console].
32+
33+
include::modules/persistent-storage-csi-google-cloud-file-create-sc.adoc[leveloffset=+1]
34+
35+
include::modules/persistent-storage-csi-google-cloud-file-delete-instances.adoc[leveloffset=+1]
36+
37+
[role="_additional-resources"]
38+
== Additional resources
39+
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]

0 commit comments

Comments
 (0)