mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: move setupEncryption() from buildCreateVolumeResponse to CreateVolume
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
bea9d56117
commit
dc990037a5
@ -251,6 +251,13 @@ func createImage(ctx context.Context, pOpts *rbdVolume, cr *util.Credentials) er
|
||||
return fmt.Errorf("failed to create rbd image: %w", err)
|
||||
}
|
||||
|
||||
if pOpts.isEncrypted() {
|
||||
err = pOpts.setupEncryption(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to setup encroption for image %s: %v", pOpts, err)
|
||||
}
|
||||
}
|
||||
|
||||
if pOpts.ThickProvision {
|
||||
err = pOpts.allocate(0)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user