Pass pod metadata to flex plugin

This commit is contained in:
Jordan Liggitt
2017-01-05 15:47:37 -05:00
parent dddc6b863e
commit b22ff25638
5 changed files with 49 additions and 11 deletions

View File

@@ -108,13 +108,15 @@ func (plugin *flexVolumePlugin) newMounterInternal(spec *volume.Spec, pod *api.P
source, readOnly := getVolumeSource(spec)
return &flexVolumeMounter{
flexVolume: &flexVolume{
driverName: source.Driver,
execPath: plugin.getExecutable(),
mounter: mounter,
plugin: plugin,
podUID: pod.UID,
podNamespace: pod.Namespace,
volName: spec.Name(),
driverName: source.Driver,
execPath: plugin.getExecutable(),
mounter: mounter,
plugin: plugin,
podName: pod.Name,
podUID: pod.UID,
podNamespace: pod.Namespace,
podServiceAccountName: pod.Spec.ServiceAccountName,
volName: spec.Name(),
},
runner: runner,
spec: spec,