Enable volume group snapshots in CSI hostpath plugin

This commit updates the CSI hostpath plugin configuration by adding the `--enable-volume-group-snapshots=true` argument to the container startup parameters. This change allows the CSI hostpath plugin to support volume group snapshots functionality, enhancing testing capabilities for features that require group snapshot support in end-to-end tests.

Signed-off-by: Manish <myathnal@redhat.com>
This commit is contained in:
Manish 2024-08-16 11:37:33 +05:30
parent 6d21b621ad
commit 1a2162fb75
2 changed files with 8 additions and 0 deletions

View File

@ -158,6 +158,7 @@ func InitHostPathCSIDriver() storageframework.TestDriver {
storageframework.CapReadWriteOncePod: true,
storageframework.CapMultiplePVsSameID: true,
storageframework.CapFSResizeFromSourceNotSupported: true,
storageframework.CapGroupSnapshot: true,
// This is needed for the
// testsuites/volumelimits.go `should support volume limits`
@ -223,6 +224,12 @@ func (h *hostpathCSIDriver) GetVolumeAttributesClass(_ context.Context, config *
},
}, config.Framework.Namespace.Name, "e2e-vac-hostpath")
}
func (h *hostpathCSIDriver) GetVolumeGroupSnapshotClass(ctx context.Context, config *storageframework.PerTestConfig, parameters map[string]string) *unstructured.Unstructured {
snapshotter := config.GetUniqueDriverName()
ns := config.Framework.Namespace.Name
return utils.GenerateVolumeGroupSnapshotClassSpec(snapshotter, parameters, ns)
}
func (h *hostpathCSIDriver) PrepareTest(ctx context.Context, f *framework.Framework) *storageframework.PerTestConfig {
// Create secondary namespace which will be used for creating driver

View File

@ -165,6 +165,7 @@ const (
CapVolumeMountGroup Capability = "volumeMountGroup" // Driver has the VolumeMountGroup CSI node capability. Because this is a FSGroup feature, the fsGroup capability must also be set to true.
CapExec Capability = "exec" // exec a file in the volume
CapSnapshotDataSource Capability = "snapshotDataSource" // support populate data from snapshot
CapGroupSnapshot Capability = "groupSnapshot" // support group snapshot
CapPVCDataSource Capability = "pvcDataSource" // support populate data from pvc
// multiple pods on a node can use the same volume concurrently;