From fb67f1189b8ef28344e197b8449de99331e5c7d9 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Tue, 25 Jul 2017 19:53:51 -0400 Subject: [PATCH] Adding metrics support to local volume Adding metrics support to local volume plugin --- pkg/volume/local/local.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/volume/local/local.go b/pkg/volume/local/local.go index 25f266d936b..33c1acbb683 100644 --- a/pkg/volume/local/local.go +++ b/pkg/volume/local/local.go @@ -102,11 +102,12 @@ func (plugin *localVolumePlugin) NewMounter(spec *volume.Spec, pod *v1.Pod, _ vo return &localVolumeMounter{ localVolume: &localVolume{ - podUID: pod.UID, - volName: spec.Name(), - mounter: plugin.host.GetMounter(), - plugin: plugin, - globalPath: volumeSource.Path, + podUID: pod.UID, + volName: spec.Name(), + mounter: plugin.host.GetMounter(), + plugin: plugin, + globalPath: volumeSource.Path, + MetricsProvider: volume.NewMetricsStatFS(volumeSource.Path), }, readOnly: readOnly, }, nil @@ -151,8 +152,7 @@ type localVolume struct { // Mounter interface that provides system calls to mount the global path to the pod local path. mounter mount.Interface plugin *localVolumePlugin - // TODO: add metrics - volume.MetricsNil + volume.MetricsProvider } func (l *localVolume) GetPath() string {