Skip to content

Commit 722c022

Browse files
committed
add paramter for list groupsnapshot
this commit adds new parameter keys for getvolumegroupsnapshot Signed-off-by: yati1998 <[email protected]>
1 parent 33b4e61 commit 722c022

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

pkg/sidecar-controller/groupsnapshot_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ func (ctrl *csiSnapshotSideCarController) checkandUpdateGroupSnapshotContentStat
873873
return groupSnapshotContent, fmt.Errorf("failed to get group snapshot class %s for group snapshot content %s: %v", *groupSnapshotContent.Spec.VolumeGroupSnapshotClassName, groupSnapshotContent.Name, err)
874874
}
875875

876-
groupSnapshotSecretRef, err := utils.GetGroupSnapshotSecretReference(utils.GroupSnapshotterSecretParams, class.Parameters, groupSnapshotContent.GetObjectMeta().GetName(), nil)
876+
groupSnapshotSecretRef, err := utils.GetGroupSnapshotSecretReference(utils.GroupSnapshotterGetSecretParams, class.Parameters, groupSnapshotContent.GetObjectMeta().GetName(), nil)
877877
if err != nil {
878878
klog.Errorf("Failed to get secret reference for group snapshot content %s: %v", groupSnapshotContent.Name, err)
879879
return groupSnapshotContent, fmt.Errorf("failed to get secret reference for group snapshot content %s: %v", groupSnapshotContent.Name, err)

pkg/utils/util.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ const (
6565
PrefixedSnapshotterListSecretNameKey = csiParameterPrefix + "snapshotter-list-secret-name" // Prefixed name key for ListSnapshots secret
6666
PrefixedSnapshotterListSecretNamespaceKey = csiParameterPrefix + "snapshotter-list-secret-namespace" // Prefixed namespace key for ListSnapshots secret
6767

68+
PrefixedGroupSnapshotterGetSecretNameKey = csiParameterPrefix + "group-snapshotter-get-secret-name" // Prefixed name key for GetVolumeGroupSnapshot secret
69+
PrefixedGroupSnapshotterGetSecretNamespaceKey = csiParameterPrefix + "group-snapshotter-get-secret-namespace" // Prefixed namespace key for GetVolumeGroupSnapshot secret
70+
6871
PrefixedVolumeSnapshotNameKey = csiParameterPrefix + "volumesnapshot/name" // Prefixed VolumeSnapshot name key
6972
PrefixedVolumeSnapshotNamespaceKey = csiParameterPrefix + "volumesnapshot/namespace" // Prefixed VolumeSnapshot namespace key
7073
PrefixedVolumeSnapshotContentNameKey = csiParameterPrefix + "volumesnapshotcontent/name" // Prefixed VolumeSnapshotContent name key
@@ -172,6 +175,12 @@ var SnapshotterListSecretParams = secretParamsMap{
172175
secretNamespaceKey: PrefixedSnapshotterListSecretNamespaceKey,
173176
}
174177

178+
var GroupSnapshotterGetSecretParams = secretParamsMap{
179+
name: "GroupSnapshotterGet",
180+
secretNameKey: PrefixedGroupSnapshotterGetSecretNameKey,
181+
secretNamespaceKey: PrefixedGroupSnapshotterGetSecretNamespaceKey,
182+
}
183+
175184
// Annotations on VolumeSnapshotContent objects entirely controlled by csi-snapshotter
176185
// Changes to these annotations will be ignored for determining whether to sync changes to content objects
177186
// AnnVolumeSnapshotBeingCreated is managed entirely by the csi-snapshotter sidecar
@@ -544,6 +553,8 @@ func RemovePrefixedParameters(param map[string]string) (map[string]string, error
544553
case PrefixedSnapshotterSecretNamespaceKey:
545554
case PrefixedSnapshotterListSecretNameKey:
546555
case PrefixedSnapshotterListSecretNamespaceKey:
556+
case PrefixedGroupSnapshotterGetSecretNameKey:
557+
case PrefixedGroupSnapshotterGetSecretNamespaceKey:
547558
case PrefixedGroupSnapshotterSecretNameKey:
548559
case PrefixedGroupSnapshotterSecretNamespaceKey:
549560
default:

0 commit comments

Comments
 (0)