Skip to content

Commit

Permalink
Fix volume attachment for Non IKS environment (#9)
Browse files Browse the repository at this point in the history
* Fix volume attachment for Non IKS environment

Signed-off-by: Meghna Singh <[email protected]>

remove unwanted file

Signed-off-by: Meghna Singh <[email protected]>

* add comments

Signed-off-by: Meghna Singh <[email protected]>
  • Loading branch information
meghnasiingh authored Aug 27, 2020
1 parent 76123c2 commit 3d0fa0d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/provider/attach_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func (vpcs *VPCSession) AttachVolume(volumeAttachmentRequest provider.VolumeAtta
}
var volumeAttachResult *models.VolumeAttachment
var varp *provider.VolumeAttachmentResponse
// If it is Non IKS environment then remove the IKSVolumeAttachment field from request struct which contains clusterID.
// TO-DO : Enhance this check. Put it in right place
if !vpcs.Config.VPCConfig.IsIKS {
volumeAttachmentRequest.IKSVolumeAttachment = nil
}
volumeAttachment := models.NewVolumeAttachment(volumeAttachmentRequest)

err = vpcs.APIRetry.FlexyRetry(vpcs.Logger, func() (error, bool) {
Expand Down

0 comments on commit 3d0fa0d

Please sign in to comment.