UPSTREAM: 57993: Add volumemetrics for glusterfs plugin
@@ -175,6 +175,7 @@ func (plugin *glusterfsPlugin) newMounterInternal(spec *volume.Spec, ep *v1.Endp
mounter: mounter,
pod: pod,
plugin: plugin,
+ MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(pod.UID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), spec.Name())),
},
hosts: ep,
path: source.Path,
@@ -193,6 +194,7 @@ func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types
mounter: mounter,
pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}},
plugin: plugin,
+ MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(podUID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), volName)),
}}, nil
}
@@ -210,7 +212,7 @@ type glusterfs struct {
pod *v1.Pod
mounter mount.Interface
plugin *glusterfsPlugin
- volume.MetricsNil
+ volume.MetricsProvider
}
type glusterfsMounter struct {
