diff --git a/.changelog/10840.txt b/.changelog/10840.txt new file mode 100644 index 000000000000..100676693bd6 --- /dev/null +++ b/.changelog/10840.txt @@ -0,0 +1,3 @@ +```release-note:bug +csi: Fixed a bug where volume secrets were not used for creating snapshots. +``` diff --git a/nomad/csi_endpoint.go b/nomad/csi_endpoint.go index f642441a724c..30a223cc33a9 100644 --- a/nomad/csi_endpoint.go +++ b/nomad/csi_endpoint.go @@ -1124,7 +1124,7 @@ func (v *CSIVolume) CreateSnapshot(args *structs.CSISnapshotCreateRequest, reply cReq := &cstructs.ClientCSIControllerCreateSnapshotRequest{ ExternalSourceVolumeID: vol.ExternalID, Name: snap.Name, - Secrets: snap.Secrets, + Secrets: vol.Secrets, Parameters: snap.Parameters, } cReq.PluginID = plugin.ID