Skip to content

Commit 3f45297

Browse files
committed
Add VolumeID to Mount request
Signed-off-by: Micah Hausler <[email protected]>
1 parent 41bb914 commit 3f45297

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/secrets-store/nodeserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const (
6565
// CSIPodServiceAccountTokens is the service account tokens of the pod that the mount is created for
6666
CSIPodServiceAccountTokens = "csi.storage.k8s.io/serviceAccount.tokens" //nolint
6767

68+
SecretStoreVolumeID = "secrets-store-csi-driver.sigs.k8s.io/volume.id"
69+
6870
secretProviderClassField = "secretProviderClass"
6971
)
7072

@@ -181,6 +183,8 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
181183
for k, v := range attrib {
182184
parameters[k] = v
183185
}
186+
// Add the volume ID to the parameters
187+
parameters[SecretStoreVolumeID] = volumeID
184188
// csi.storage.k8s.io/serviceAccount.tokens is empty for Kubernetes version < 1.20.
185189
// For 1.20+, if tokenRequests is set in the CSI driver spec, kubelet will generate
186190
// a token for the pod and send it to the CSI driver.

0 commit comments

Comments
 (0)