diff --git a/cmd/csi-provisioner/csi-provisioner.go b/cmd/csi-provisioner/csi-provisioner.go index adb34abd3..038f51f64 100644 --- a/cmd/csi-provisioner/csi-provisioner.go +++ b/cmd/csi-provisioner/csi-provisioner.go @@ -315,7 +315,7 @@ func main() { if err != nil { klog.Fatalf("Failed to get node info from CSI driver: %v", err) } - nodeDeployment.NodeInfo = *nodeInfo + nodeDeployment.NodeInfo = nodeInfo } var nodeLister listersv1.NodeLister diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 1ce19ad68..fe55ac5fa 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -233,7 +233,7 @@ type NodeDeployment struct { ClaimInformer coreinformers.PersistentVolumeClaimInformer // NodeInfo is the result of NodeGetInfo. It is need to determine which // PVs were created for the node. - NodeInfo csi.NodeGetInfoResponse + NodeInfo *csi.NodeGetInfoResponse // ImmediateBinding enables support for PVCs with immediate binding. ImmediateBinding bool // BaseDelay is the initial time that the external-provisioner waits @@ -850,7 +850,7 @@ func (p *csiProvisioner) Provision(ctx context.Context, options controller.Provi } if rep.Volume != nil { - klog.V(3).Infof("create volume rep: %+v", *rep.Volume) + klog.V(3).Infof("create volume rep: %+v", rep.Volume) } volumeAttributes := map[string]string{provisionerIDKey: p.identity} for k, v := range rep.Volume.VolumeContext { diff --git a/pkg/controller/controller_test.go b/pkg/controller/controller_test.go index 78eb486e0..e902acb81 100644 --- a/pkg/controller/controller_test.go +++ b/pkg/controller/controller_test.go @@ -5541,7 +5541,7 @@ func runDeleteTest(t *testing.T, k string, tc deleteTestcase) { nodeDeployment = &NodeDeployment{ NodeName: tc.deploymentNode, ClaimInformer: claimInformer, - NodeInfo: csi.NodeGetInfoResponse{ + NodeInfo: &csi.NodeGetInfoResponse{ NodeId: tc.deploymentNode, AccessibleTopology: &csi.Topology{ Segments: map[string]string{