Commit dc0b7da5 authored by Humble Chirammal's avatar Humble Chirammal

Add volumemetrics for glusterfs plugin.

parent 2d2fa023
...@@ -176,6 +176,7 @@ func (plugin *glusterfsPlugin) newMounterInternal(spec *volume.Spec, ep *v1.Endp ...@@ -176,6 +176,7 @@ func (plugin *glusterfsPlugin) newMounterInternal(spec *volume.Spec, ep *v1.Endp
mounter: mounter, mounter: mounter,
pod: pod, pod: pod,
plugin: plugin, plugin: plugin,
MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(pod.UID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), spec.Name())),
}, },
hosts: ep, hosts: ep,
path: source.Path, path: source.Path,
...@@ -194,6 +195,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types ...@@ -194,6 +195,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types
mounter: mounter, mounter: mounter,
pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}}, pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}},
plugin: plugin, plugin: plugin,
MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(podUID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), volName)),
}}, nil }}, nil
} }
...@@ -211,7 +213,7 @@ type glusterfs struct { ...@@ -211,7 +213,7 @@ type glusterfs struct {
pod *v1.Pod pod *v1.Pod
mounter mount.Interface mounter mount.Interface
plugin *glusterfsPlugin plugin *glusterfsPlugin
volume.MetricsNil volume.MetricsProvider
} }
type glusterfsMounter struct { type glusterfsMounter struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment