@@ -200,7 +200,7 @@ func getDriverCapabilities(conn *grpc.ClientConn, timeout time.Duration) (sets.I
200200 switch service .GetType () {
201201 case csi .PluginCapability_Service_CONTROLLER_SERVICE :
202202 capabilities .Insert (PluginCapability_CONTROLLER_SERVICE )
203- case csi .PluginCapability_Service_ACCESSIBILITY_CONSTRAINTS :
203+ case csi .PluginCapability_Service_VOLUME_ACCESSIBILITY_CONSTRAINTS :
204204 capabilities .Insert (PluginCapability_ACCESSIBILITY_CONSTRAINTS )
205205 }
206206 }
@@ -458,7 +458,7 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
458458 if err != nil {
459459 return nil , err
460460 }
461- req .ControllerCreateSecrets = provisionerCredentials
461+ req .Secrets = provisionerCredentials
462462
463463 // Resolve controller publish, node stage, node publish secret references
464464 controllerPublishSecretRef , err := getSecretReference (controllerPublishSecretNameKey , controllerPublishSecretNamespaceKey , options .Parameters , pvName , options .PVC )
@@ -503,16 +503,16 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
503503 glog .V (3 ).Infof ("create volume rep: %+v" , * rep .Volume )
504504 }
505505 volumeAttributes := map [string ]string {provisionerIDKey : p .identity }
506- for k , v := range rep .Volume .Attributes {
506+ for k , v := range rep .Volume .VolumeContext {
507507 volumeAttributes [k ] = v
508508 }
509509 respCap := rep .GetVolume ().GetCapacityBytes ()
510510 if respCap < volSizeBytes {
511511 capErr := fmt .Errorf ("created volume capacity %v less than requested capacity %v" , respCap , volSizeBytes )
512512 delReq := & csi.DeleteVolumeRequest {
513- VolumeId : rep .GetVolume ().GetId (),
513+ VolumeId : rep .GetVolume ().GetVolumeId (),
514514 }
515- delReq .ControllerDeleteSecrets = provisionerCredentials
515+ delReq .Secrets = provisionerCredentials
516516 ctx , cancel := context .WithTimeout (context .Background (), p .timeout )
517517 defer cancel ()
518518 _ , err := p .csiClient .DeleteVolume (ctx , delReq )
@@ -537,7 +537,7 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
537537 PersistentVolumeSource : v1.PersistentVolumeSource {
538538 CSI : & v1.CSIPersistentVolumeSource {
539539 Driver : driverState .driverName ,
540- VolumeHandle : p .volumeIdToHandle (rep .Volume .Id ),
540+ VolumeHandle : p .volumeIdToHandle (rep .Volume .VolumeId ),
541541 FSType : fsType ,
542542 VolumeAttributes : volumeAttributes ,
543543 ControllerPublishSecretRef : controllerPublishSecretRef ,
@@ -584,7 +584,7 @@ func (p *csiProvisioner) getVolumeContentSource(options controller.VolumeOptions
584584
585585 snapshotSource := csi.VolumeContentSource_Snapshot {
586586 Snapshot : & csi.VolumeContentSource_SnapshotSource {
587- Id : snapContentObj .Spec .VolumeSnapshotSource .CSI .SnapshotHandle ,
587+ SnapshotId : snapContentObj .Spec .VolumeSnapshotSource .CSI .SnapshotHandle ,
588588 },
589589 }
590590 glog .V (5 ).Infof ("VolumeContentSource_Snapshot %+v" , snapshotSource )
@@ -641,7 +641,7 @@ func (p *csiProvisioner) Delete(volume *v1.PersistentVolume) error {
641641 if err != nil {
642642 return err
643643 }
644- req .ControllerDeleteSecrets = credentials
644+ req .Secrets = credentials
645645 }
646646
647647 }
0 commit comments