Skip to content

Commit b5fd8df

Browse files
authored
Merge branch 'kubernetes-csi:master' into snapshot-metadata-sidecar-alpha
2 parents 95a3072 + 7ad7935 commit b5fd8df

File tree

5 files changed

+103
-18
lines changed

5 files changed

+103
-18
lines changed

.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
# Publish generated site as artifact. Unfortunately viewing it requires
2828
# downloading a .zip and uncompressing that (https://github.com/actions/upload-artifact/issues/14#issuecomment-620728238)
29-
- uses: actions/upload-artifact@v2
29+
- uses: actions/upload-artifact@v4
3030
with:
3131
name: html-docs
3232
path: docs

book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- [Secrets & Credentials](secrets-and-credentials.md)
2727
- [StorageClass Secrets](secrets-and-credentials-storage-class.md)
2828
- [VolumeSnapshotClass Secrets](secrets-and-credentials-volume-snapshot-class.md)
29+
- [VolumeGroupSnapshotClass Secrets](secrets-and-credentials-volume-group-snapshot-class.md)
2930
- [Topology](topology.md)
3031
- [Raw Block Volume](raw-block.md)
3132
- [Skip Attach](skip-attach.md)

book/src/drivers.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ Name | CSI Driver Name | Compatible with CSI Version(s) | Description | Persiste
6565
[HPE](https://github.com/hpe-storage/csi-driver) | `csi.hpe.com` | v1.3 | A [multi-platform](https://scod.hpedev.io/csi_driver) Container Storage Interface (CSI) driver. Supports [HPE Alletra](https://hpe.com/storage/alletra), [Nimble Storage](https://hpe.com/storage/nimble), [Primera](https://hpe.com/storage/primera) and [3PAR](https://hpe.com/storage/3par) | Persistent and Ephemeral | Read/Write Multiple Pods | Yes | Raw Block, Snapshot, Expansion, Cloning
6666
[HPE ClusterStor Lustre CSI](https://github.com/HewlettPackard/lustre-csi-driver) | `lustre-csi.hpe.com` | v1.5 | A Container Storage Interface (CSI) Driver for HPE Cray ClusterStor Lustre Storage | Persistent | Read/Write Multiple Pods | No |
6767
[HPE Ezmeral (MapR)](https://github.com/mapr/mapr-csi) | `com.mapr.csi-kdf` | v1.3 | A Container Storage Interface (CSI) Driver for HPE Ezmeral Data Fabric | Persistent | Read/Write Multiple Pods | Yes | Raw Block, Snapshot, Expansion, Cloning
68+
[HPE GreenLake for File Storage CSI Driver](https://scod.hpedev.io/filex_csi_driver) | `filex.csi.hpe.com` | v1.2 | A Container Storage Interface (CSI) Driver for [HPE GreenLake for File Storage](https://www.hpe.com/us/en/hpe-greenlake-file-storage.html). | Persistent and Ephemeral | Read/Write Multiple Pods | Yes | Snapshot, Expansion, Cloning
6869
[Huawei Storage CSI](https://github.com/Huawei/eSDK_K8S_Plugin) | `csi.huawei.com` | v1.0, v1.1, v1.2 | A Container Storage Interface (CSI) Driver for FusionStorage, OceanStor 100D, OceanStor Pacific, OceanStor Dorado V3, OceanStor Dorado V6, OceanStor V3, OceanStor V5 | Persistent | Read/Write Multiple Pod | Yes | Snapshot, Expansion, Cloning
6970
[HwameiStor](https://github.com/hwameistor/hwameistor) | `lvm.hwameistor.io disk.hwameistor.io ` | v1.3 | A Container Storage Interface (CSI) Driver for Local Storage | Persistent | Read/Write Single Pod | Yes | Raw Block, Expansion
7071
[HyperV CSI](https://github.com/Zetanova/hyperv-csi-driver) | `eu.zetanova.csi.hyperv` | v1.0, v1.1 | A Container Storage Interface (CSI) driver to manage hyperv hosts | Persistent | Read/Write Multiple Pods | Yes |
71-
[IBM Block Storage](https://github.com/ibm/ibm-block-csi-driver) | `block.csi.ibm.com` | [v1.0, v1.5] | A Container Storage Interface (CSI) [Driver](https://www.ibm.com/docs/en/stg-block-csi-driver) for IBM Spectrum Virtualize Family, IBM FlashSystem A9000 and A9000R, IBM DS8000 Family 8.x and higher. | Persistent | Read/Write Single Pod | Yes | Raw Block, Snapshot, Expansion, Cloning, Topology
72+
[IBM Block Storage](https://github.com/ibm/ibm-block-csi-driver) | `block.csi.ibm.com` | [v1.0, v1.5] | A Container Storage Interface (CSI) [Driver](https://www.ibm.com/docs/en/stg-block-csi-driver) for IBM Spectrum Virtualize Family, IBM DS8000 Family 8.x and higher. | Persistent | Read/Write Multiple Pod | Yes | Raw Block, Snapshot, Expansion, Cloning, Topology
7273
[IBM Storage Scale](https://github.com/IBM/ibm-spectrum-scale-csi) | `spectrumscale.csi.ibm.com` | v1.5 | A Container Storage Interface (CSI) [Driver](https://www.ibm.com/docs/en/spectrum-scale-csi) for the IBM Storage Scale File System | Persistent | Read/Write Multiple Pod | Yes | Snapshot, Expansion, Cloning
7374
[IBM Cloud Block Storage VPC CSI Driver](https://github.com/kubernetes-sigs/ibm-vpc-block-csi-driver) | `vpc.block.csi.ibm.io` | v1.5 | A Container Storage Interface (CSI) [Driver](https://cloud.ibm.com/docs/containers?topic=containers-vpc-block) for IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud | Persistent | Read/Write Single Pod | Yes | Raw Block, Expansion, Snapshot
7475
[Infinidat](https://github.com/Infinidat/infinibox-csi-driver) | `infinibox-csi-driver` | v1.0, v1.8 | A Container Storage Interface (CSI) Driver for Infinidat [InfiniBox](https://infinidat.com/en/products-technology/infinibox) | Persistent | Read/Write Multiple Pods | Yes | Raw Block, Snapshot, Expansion, Cloning, Topology

book/src/group-snapshot-restore-feature.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
Status | Min K8s Version | Max K8s Version | snapshot-controller Version | snapshot-validation-webhook Version | CSI external-snapshotter sidecar Version | external-provisioner Version
66
--|--|--|--|--|--|--
7-
Alpha | 1.27 | - | 7.0+ | 7.0+ | 7.0+ | 4.0+
7+
Alpha | 1.27 | 1.32 | 7.0+ | 7.0+ | 7.0+ | 4.0+
8+
Beta | 1.32 | - | 8.2+ | 8.2+ | 8.2+ | 5.1+
89

910
**IMPORTANT**: The validation logic for VolumeGroupSnapshots and VolumeGroupSnapshotContents has been replaced by CEL validation rules. The validating webhook is now only being used for VolumeGroupSnapshotClasses to ensure that there's at most one default class per CSI Driver. The validation webhook is deprecated and will be removed in the next release
1011

@@ -131,35 +132,34 @@ kubectl label pvc hpvc hpvc-2 app.kubernetes.io/name=postgresql
131132

132133
Create a _VolumeGroupSnapshotClass_:
133134
```
134-
kubectl create -f groupsnapshotclass-v1alpha1.yaml
135+
kubectl create -f groupsnapshotclass-v1beta1.yaml
135136
```
136137

137138
Create a _VolumeGroupSnapshot_:
138139
```
139-
kubectl create -f groupsnapshot-v1alpha1.yaml
140+
kubectl create -f groupsnapshot-v1beta1.yaml
141+
```
142+
143+
Once the _VolumeGroupSnapshot_ is ready, list the _VolumeSnapshot_ whose owner is the _VolumeGroupSnapshot_:
144+
145+
```
146+
kubectl get volumegroupsnapshot
147+
NAME READYTOUSE VOLUMEGROUPSNAPSHOTCLASS VOLUMEGROUPSNAPSHOTCONTENT CREATIONTIME AGE
148+
new-groupsnapshot-demo true csi-hostpath-groupsnapclass groupsnapcontent-fb7a1c20-54d3-444c-a604-b3ff0f4a8801 4m57s 5m26s
140149
```
141150

142-
Once the _VolumeGroupSnapshot_ is ready, the `pvcVolumeSnapshotRefList` status field will contain the names of the generated _VolumeSnapshot_ objects:
143151
```
144-
kubectl get volumegroupsnapshot new-groupsnapshot-demo -o yaml | sed -n '/pvcVolumeSnapshotRefList/,$p'
152+
kubectl get volumesnapshot -o=jsonpath='{range .items[?(@.metadata.ownerReferences[0].name=="new-groupsnapshot-demo")]}{.metadata.name}{"\n"}{end}'
145153
146-
pvcVolumeSnapshotRefList:
147-
- persistentVolumeClaimRef:
148-
name: hpvc
149-
volumeSnapshotRef:
150-
name: snapshot-4bcc4a322a473abf32babe3df5779d14349542b1f0eb6f9dab0466a85c59cd42-2024-06-19-12.35.17
151-
- persistentVolumeClaimRef:
152-
name: hpvc-2
153-
volumeSnapshotRef:
154-
name: snapshot-62bd0be591e1e10c22d51748cd4a53c0ae8bf52fabb482bee7bc51f8ff9d9589-2024-06-19-12.35.17
155-
readyToUse: true
154+
snapshot-4dc1c53a29538b36e85003503a4bcac5dbde4cff59e81f1e3bb80b6c18c3fd03
155+
snapshot-fbfe59eff570171765df664280910c3bf1a4d56e233a5364cd8cb0152a35965b
156156
```
157157

158158
Create a _PVC_ from a _VolumeSnapshot_ that is part of the group snapshot:
159159
```
160160
# In the command below, the volume snapshot name should be chosen from
161161
# the ones listed in the output of the previous command
162-
sed 's/new-snapshot-demo-v1/snapshot-4bcc4a322a473abf32babe3df5779d14349542b1f0eb6f9dab0466a85c59cd42-2024-06-19-12.35.17/' restore.yaml | kubectl create -f -
162+
sed 's/new-snapshot-demo-v1/snapshot-4dc1c53a29538b36e85003503a4bcac5dbde4cff59e81f1e3bb80b6c18c3fd03/' restore.yaml | kubectl create -f -
163163
```
164164

165165
## Examples
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# VolumeGroupSnapshotClass Secrets
2+
3+
The CSI [external-snapshotter](external-snapshotter.md) sidecar container facilitates the handling of secrets for the following operations:
4+
* `CreateGroupSnapshotRequest`
5+
* `DeleteGroupSnapshotRequest`
6+
* `GetGroupSnapshotRequest`
7+
8+
CSI `external-snapshotter` v8.1.0+ supports the following keys in `VolumeGroupSnapshotClass.parameters`:
9+
10+
* `csi.storage.k8s.io/group-snapshotter-secret-name`
11+
* `csi.storage.k8s.io/group-snapshotter-secret-namespace`
12+
13+
With CSI `external-snapshotter` v8.2.0 the following additional `VolumeGroupSnapshotClass.parameters` were added specifically for `GetGroupSnapshotRequest` operations:
14+
15+
* `csi.storage.k8s.io/group-snapshotter-get-secret-name`
16+
* `csi.storage.k8s.io/group-snapshotter-get-secret-namespace`
17+
18+
Cluster admins can populate the secret fields for the operations listed above with data from Kubernetes `Secret` objects by specifying these keys in the `VolumeGroupSnapshotClass` object.
19+
20+
## Operations
21+
Details for each secret supported by the external-snapshotter can be found below.
22+
23+
### Create/Delete VolumeGroupSnapshot Secret
24+
25+
CSI `external-snapshotter` v8.1.0+ looks for the following keys in `VolumeGroupSnapshotClass.parameters` for `CreateGroupSnapshotRequest` and `DeleteGroupSnapshotRequest` operations:
26+
27+
* `csi.storage.k8s.io/group-snapshotter-secret-name`
28+
* `csi.storage.k8s.io/group-snapshotter-secret-namespace`
29+
30+
The values of both of these parameters, together, refer to the name and namespace of a `Secret` object in the Kubernetes API.
31+
32+
If specified, the CSI `external-snapshotter` will attempt to fetch the secret before creation and deletion.
33+
34+
If the secret is retrieved successfully, the snapshotter passes it to the CSI driver in the `CreateGroupSnapshotRequest.secrets` or `DeleteGroupSnapshotRequest.secrets` field.
35+
36+
If no such secret exists in the Kubernetes API, or the snapshotter is unable to fetch it, the create operation will fail.
37+
38+
Note, however, that the delete operation will continue even if the secret is not found (because, for example, the entire namespace containing the secret was deleted). In this case, if the driver requires a secret for deletion, then the volume group snapshot and related snapshots need to be manually cleaned up.
39+
40+
The values of these parameters may be "templates". The `external-snapshotter` will automatically resolve templates at volume group snapshot create time, as detailed below:
41+
42+
* `csi.storage.k8s.io/group-snapshotter-secret-name`
43+
* `${volumegroupsnapshotcontent.name}`
44+
* Replaced with name of the `VolumeGroupSnapshotContent` object being created.
45+
* `${volumegroupsnapshot.namespace}`
46+
* Replaced with namespace of the `VolumeGroupSnapshot` object that triggered creation.
47+
* `${volumegroupsnapshot.name}`
48+
* Replaced with the name of the `VolumeGroupSnapshot` object that triggered creation.
49+
* `csi.storage.k8s.io/group-snapshotter-secret-namespace`
50+
* `${volumegroupsnapshotcontent.name}`
51+
* Replaced with name of the `VolumeGroupSnapshotContent` object being created.
52+
* `${volumegroupsnapshot.namespace}`
53+
* Replaced with namespace of the `VolumeGroupSnapshot` object that triggered creation.
54+
55+
### Get VolumeGroupSnapshot Secret
56+
57+
CSI `external-snapshotter` v8.2.0+ looks for the following keys in `VolumeGroupSnapshotClass.parameters` for `GetGroupSnapshotRequest` operations:
58+
59+
* `csi.storage.k8s.io/group-snapshotter-get-secret-name`
60+
* `csi.storage.k8s.io/group-snapshotter-get-secret-namespace`
61+
62+
The values of both of these parameters, together, refer to the name and namespace of a `Secret` object in the Kubernetes API.
63+
64+
If specified, the CSI `external-snapshotter` will attempt to fetch the secret before creation and deletion.
65+
66+
If the secret is retrieved successfully, the snapshotter passes it to the CSI driver in the `GetGroupSnapshotRequest.secrets` field.
67+
68+
If no such secret exists in the Kubernetes API, or the snapshotter is unable to fetch it, the create operation will fail.
69+
70+
The values of these parameters may be "templates". The `external-snapshotter` will automatically resolve templates at volume group snapshot create time, as detailed below:
71+
72+
* `csi.storage.k8s.io/group-snapshotter-secret-name`
73+
* `${volumegroupsnapshotcontent.name}`
74+
* Replaced with name of the `VolumeGroupSnapshotContent` object being created.
75+
* `${volumegroupsnapshot.namespace}`
76+
* Replaced with namespace of the `VolumeGroupSnapshot` object that triggered creation.
77+
* `${volumegroupsnapshot.name}`
78+
* Replaced with the name of the `VolumeGroupSnapshot` object that triggered creation.
79+
* `csi.storage.k8s.io/group-snapshotter-secret-namespace`
80+
* `${volumegroupsnapshotcontent.name}`
81+
* Replaced with name of the `VolumeGroupSnapshotContent` object being created.
82+
* `${volumegroupsnapshot.namespace}`
83+
* Replaced with namespace of the `VolumeGroupSnapshot` object that triggered creation.

0 commit comments

Comments
 (0)