Skip to content

Commit

Permalink
Merge pull request #52 from sbezverk/e2e_issue
Browse files Browse the repository at this point in the history
provisioner Secret fix
  • Loading branch information
sbezverk authored Mar 5, 2018
2 parents 50f3bbc + 1c79b3a commit 17bd549
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,17 @@ func (p *csiProvisioner) Provision(options controller.VolumeOptions) (*v1.Persis
// TODO wait for CSI VolumeSource API
PersistentVolumeSource: v1.PersistentVolumeSource{
CSI: &v1.CSIPersistentVolumeSource{
Driver: p.driverName,
VolumeHandle: p.volumeIdToHandle(rep.Volume.Id),
VolumeAttributes: volumeAttributes,
NodePublishSecretRef: &secret,
Driver: p.driverName,
VolumeHandle: p.volumeIdToHandle(rep.Volume.Id),
VolumeAttributes: volumeAttributes,
},
},
},
}

if len(secret.Name) != 0 {
pv.Spec.PersistentVolumeSource.CSI.NodePublishSecretRef = &secret
}
glog.Infof("successfully created PV %+v", pv.Spec.PersistentVolumeSource)

return pv, nil
Expand Down

0 comments on commit 17bd549

Please sign in to comment.