@@ -149,6 +149,8 @@ elsewhere in GCP.
149149 1. Create a `VolumeSnapshot` resource which will be bound to a pre-provisioned
150150 `VolumeSnapshotContents`. Note this is called `restored-snapshot`; this
151151 name can be changed, but do it consistently across the other resources.
152+ `VolumeSnapshotContentName` field must reference to the
153+ VolumeSnapshotContent's name for the bidirectional binding to be valid.
152154 ```console
153155 kubectl apply -f - <<EOF
154156 apiVersion: snapshot.storage.k8s.io/v1beta1
@@ -158,22 +160,24 @@ elsewhere in GCP.
158160 spec:
159161 volumeSnapshotClassName: csi-gce-pd-snapshot-class
160162 source:
161- volumeSnapshotContentName: snapcontent-migrated
163+ volumeSnapshotContentName: restored-snapshot-content
162164 EOF
163165 ```
164166 1. Create a `VolumeSnapshotContents` pointing to your existing PD
165- snapshot from the first step.
167+ snapshot from the first step. Both `volumeSnapshotRef.name` and
168+ `volumeSnapshotRef.namespace` must point to the previously created
169+ VolumeSnapshot for the bidirectional binding to be valid.
166170 ```console
167171 kubectl apply -f - <<EOF
168172 apiVersion: snapshot.storage.k8s.io/v1beta1
169- kind: VolumeSnapshotContents
173+ kind: VolumeSnapshotContent
170174 metadata:
171175 name: restored-snapshot-content
172176 spec:
173177 deletionPolicy: Retain
174178 driver: pd.csi.storage.gke.io
175179 source:
176- snapshotHandle: projects/$PROJECT_ID/global/snapshots/$SNAPSHOT_ID
180+ snapshotHandle: projects/$PROJECT_ID/global/snapshots/$SNAPSHOT_NAME
177181 volumeSnapshotRef:
178182 kind: VolumeSnapshot
179183 name: restored-snapshot
0 commit comments