diff --git a/modules/persistent-storage-csi-snapshots-operator.adoc b/modules/persistent-storage-csi-snapshots-operator.adoc index 9f5689b3957f..9f6525016ea9 100644 --- a/modules/persistent-storage-csi-snapshots-operator.adoc +++ b/modules/persistent-storage-csi-snapshots-operator.adoc @@ -6,7 +6,7 @@ [id="persistent-storage-csi-snapshots-operator_{context}"] = About the CSI Snapshot Controller Operator -The CSI Snapshot Controller Operator runs in the `openshift-cluster-storage-operator` namespace. It is installed by the Cluster Version Operator (CVO) in all clusters by default. +The Container Storage Interface (CSI) Snapshot Controller Operator runs in the `openshift-cluster-storage-operator` namespace. It is installed by the Cluster Version Operator (CVO) in all clusters by default. The CSI Snapshot Controller Operator installs the CSI snapshot controller, which runs in the `openshift-cluster-storage-operator` namespace. @@ -32,10 +32,53 @@ The `VolumeSnapshot` CRD is namespaced. A developer uses the CRD as a distinct r `VolumeSnapshotClass`:: -Allows a cluster administrator to specify different attributes belonging to a `VolumeSnapshot` object. These attributes may differ among snapshots taken of the same volume on the storage system, in which case they would not be expressed by using the same storage class of a persistent volume claim. +The `VolumeSnapshotClass` CRD allows a cluster administrator to specify different attributes belonging to a `VolumeSnapshot` object. These attributes may differ among snapshots taken of the same volume on the storage system, in which case they would not be expressed by using the same storage class of a persistent volume claim. + The `VolumeSnapshotClass` CRD defines the parameters for the `csi-external-snapshotter` sidecar to use when creating a snapshot. This allows the storage back end to know what kind of snapshot to dynamically create if multiple options are supported. + Dynamically provisioned snapshots use the `VolumeSnapshotClass` CRD to specify storage-provider-specific parameters to use when creating a snapshot. + The `VolumeSnapshotContentClass` CRD is not namespaced and is for use by a cluster administrator to enable global configuration options for their storage back end. ++ +For Google Cloud Platform (GCP) persistent disk (PD) storage CSI, there is a non-default `VolumeSnapshotClass`, `csi-gce-pd-vsc-images`, that includes the `snapshot-type`: `images` parameter. When using KubeVirt, this allows you to create VMs from "golden images" (templates saved as snapshots). ++ +If you want to use the images volume snapshot class for dynamic snapshot provisioning, you can either: + +* Make the images volume snapshot class the default by changing the `snapshot.storage.kubernetes.io/is-default-class` annotation to `true`. Also, for the normal default volume snapshot class, `csi-gce-pd-vsc`, be sure to change this parameter to `false`. + +* When creating the snapshot object, be sure to set `volumeSnapshotClassName` to `csi-gce-pd-vsc-images`. ++ +For information about creating volume snapshots, see Section _Creating a volume snapshot_. ++ +.Example images volume snapshot class YAML file +[source,yaml] +---- +apiVersion: snapshot.storage.k8s.io/v1 +deletionPolicy: Delete +driver: pd.csi.storage.gke.io +kind: VolumeSnapshotClass +metadata: + creationTimestamp: '2026-02-26T14:16:59Z' + generation: 1 + managedFields: + - apiVersion: snapshot.storage.k8s.io/v1 + fieldsType: FieldsV1 + fieldsV1: + 'f:deletionPolicy': {} + 'f:driver': {} + 'f:parameters': + .: {} + 'f:snapshot-type': {} + manager: gcp-pd-csi-driver-operator + operation: Update + time: '2026-02-26T14:16:59Z' + name: csi-gce-pd-vsc-images + resourceVersion: '9895' + uid: ea345890-afc8-4a06-92be-1f7c62429dec +parameters: + snapshot-type: images +---- ++ +* `metadata.name:csi-gce-pd-vsc-images`: Name for the non-default images volume snapshot class. + +* `parameters: snapshot-type: images`: Defines the snapshot as a "golden image" or a bootable template, rather than the standard disk backup. diff --git a/storage/container_storage_interface/persistent-storage-csi-gcp-pd.adoc b/storage/container_storage_interface/persistent-storage-csi-gcp-pd.adoc index c73bc3e21a28..6a6303fccd47 100644 --- a/storage/container_storage_interface/persistent-storage-csi-gcp-pd.adoc +++ b/storage/container_storage_interface/persistent-storage-csi-gcp-pd.adoc @@ -63,6 +63,13 @@ include::modules/persistent-storage-byok.adoc[leveloffset=+1] For information about installing with user-managed encryption for GCP PD, see xref:../../installing/installing_gcp/installing-gcp-customizations.adoc#installation-configuration-parameters_installing-gcp-customizations[Installation configuration parameters]. endif::openshift-rosa,openshift-dedicated[] +ifndef::openshift-rosa,openshift-dedicated[] +== Creating VMs from templates saved as snapshots (golden images) +For Google Cloud Platform (GCP) persistent disk (PD) storage CSI, there is a non-default `VolumeSnapshotClass`, `csi-gce-pd-vsc-images`, that includes the `snapshot-type`: `images` parameter. When using KubeVirt, this allows you to create VMs from "golden images" (templates saved as snapshots). + +For more information, see xref:../../storage/container_storage_interface/persistent-storage-csi-snapshots.adoc#volume-snapshot-crds[Volume snapshots CRD: VolumeSnapshotClass]. +endif::openshift-rosa,openshift-dedicated[] + [id="resources-for-gcp"] [role="_additional-resources"] == Additional resources