mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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: Humble 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 ```
This commit is contained in:
commit
33134cb02c
@ -172,10 +172,11 @@ func (plugin *glusterfsPlugin) newMounterInternal(spec *volume.Spec, ep *v1.Endp
|
||||
source, readOnly := plugin.getGlusterVolumeSource(spec)
|
||||
return &glusterfsMounter{
|
||||
glusterfs: &glusterfs{
|
||||
volName: spec.Name(),
|
||||
mounter: mounter,
|
||||
pod: pod,
|
||||
plugin: plugin,
|
||||
volName: spec.Name(),
|
||||
mounter: mounter,
|
||||
pod: pod,
|
||||
plugin: plugin,
|
||||
MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(pod.UID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), spec.Name())),
|
||||
},
|
||||
hosts: ep,
|
||||
path: source.Path,
|
||||
@ -190,10 +191,11 @@ func (plugin *glusterfsPlugin) NewUnmounter(volName string, podUID types.UID) (v
|
||||
|
||||
func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types.UID, mounter mount.Interface) (volume.Unmounter, error) {
|
||||
return &glusterfsUnmounter{&glusterfs{
|
||||
volName: volName,
|
||||
mounter: mounter,
|
||||
pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}},
|
||||
plugin: plugin,
|
||||
volName: volName,
|
||||
mounter: mounter,
|
||||
pod: &v1.Pod{ObjectMeta: metav1.ObjectMeta{UID: podUID}},
|
||||
plugin: plugin,
|
||||
MetricsProvider: volume.NewMetricsStatFS(plugin.host.GetPodVolumeDir(podUID, strings.EscapeQualifiedNameForDisk(glusterfsPluginName), volName)),
|
||||
}}, nil
|
||||
}
|
||||
|
||||
@ -211,7 +213,7 @@ type glusterfs struct {
|
||||
pod *v1.Pod
|
||||
mounter mount.Interface
|
||||
plugin *glusterfsPlugin
|
||||
volume.MetricsNil
|
||||
volume.MetricsProvider
|
||||
}
|
||||
|
||||
type glusterfsMounter struct {
|
||||
|
Loading…
Reference in New Issue
Block a user