Unverified Commit 33134cb0 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #57993 from humblec/volume-metrics

Automatic merge from submit-queue (batch tested with PRs 57993, 58028). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add volumemetrics for glusterfs plugin. Signed-off-by: 's avatarHumble Chirammal <hchiramm@redhat.com> **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 2e9a277a dc0b7da5
...@@ -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