Skip to content

Commit b3bf61d

Browse files
author
Lisa Pettyjohn
committed
OSDOCS-18456#GCP PD images snapshot class
1 parent f766a0e commit b3bf61d

2 files changed

Lines changed: 52 additions & 2 deletions

File tree

modules/persistent-storage-csi-snapshots-operator.adoc

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="persistent-storage-csi-snapshots-operator_{context}"]
77
= About the CSI Snapshot Controller Operator
88

9-
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.
9+
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.
1010

1111
The CSI Snapshot Controller Operator installs the CSI snapshot controller, which runs in the `openshift-cluster-storage-operator` namespace.
1212

@@ -32,10 +32,53 @@ The `VolumeSnapshot` CRD is namespaced. A developer uses the CRD as a distinct r
3232

3333
`VolumeSnapshotClass`::
3434

35-
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.
35+
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.
3636
+
3737
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.
3838
+
3939
Dynamically provisioned snapshots use the `VolumeSnapshotClass` CRD to specify storage-provider-specific parameters to use when creating a snapshot.
4040
+
4141
The `VolumeSnapshotContentClass` CRD is not namespaced and is for use by a cluster administrator to enable global configuration options for their storage back end.
42+
+
43+
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).
44+
+
45+
If you want to use the images volume snapshot class for dynamic snapshot provisioning, you can either:
46+
47+
* 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`.
48+
49+
* When creating the snapshot object, be sure to set `volumeSnapshotClassName` to `csi-gce-pd-vsc-images`.
50+
+
51+
For information about creating volume snapshots, see Section _Creating a volume snapshot_.
52+
+
53+
.Example images volume snapshot class YAML file
54+
[source,yaml]
55+
----
56+
apiVersion: snapshot.storage.k8s.io/v1
57+
deletionPolicy: Delete
58+
driver: pd.csi.storage.gke.io
59+
kind: VolumeSnapshotClass
60+
metadata:
61+
creationTimestamp: '2026-02-26T14:16:59Z'
62+
generation: 1
63+
managedFields:
64+
- apiVersion: snapshot.storage.k8s.io/v1
65+
fieldsType: FieldsV1
66+
fieldsV1:
67+
'f:deletionPolicy': {}
68+
'f:driver': {}
69+
'f:parameters':
70+
.: {}
71+
'f:snapshot-type': {}
72+
manager: gcp-pd-csi-driver-operator
73+
operation: Update
74+
time: '2026-02-26T14:16:59Z'
75+
name: csi-gce-pd-vsc-images
76+
resourceVersion: '9895'
77+
uid: ea345890-afc8-4a06-92be-1f7c62429dec
78+
parameters:
79+
snapshot-type: images
80+
----
81+
+
82+
* `metadata.name:csi-gce-pd-vsc-images`: Name for the non-default images volume snapshot class.
83+
84+
* `parameters: snapshot-type: images`: Defines the snapshot as a "golden image" or a bootable template, rather than the standard disk backup.

storage/container_storage_interface/persistent-storage-csi-gcp-pd.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ include::modules/persistent-storage-byok.adoc[leveloffset=+1]
6363
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].
6464
endif::openshift-rosa,openshift-dedicated[]
6565

66+
ifndef::openshift-rosa,openshift-dedicated[]
67+
== Creating VMs from templates saved as snapshots (golden images)
68+
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).
69+
70+
For more information, see xref:../../storage/container_storage_interface/persistent-storage-csi-snapshots.adoc#volume-snapshot-crds[Volume snapshots CRD: VolumeSnapshotClass].
71+
endif::openshift-rosa,openshift-dedicated[]
72+
6673
[id="resources-for-gcp"]
6774
[role="_additional-resources"]
6875
== Additional resources

0 commit comments

Comments
 (0)