mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Add volumemetrics for glusterfs plugin.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
2d2fa02337
commit
dc0b7da5b7
@ -172,10 +172,11 @@ func (plugin *glusterfsPlugin) newMounterInternal(spec *volume.Spec, ep *v1.Endp
|
|||||||
source, readOnly := plugin.getGlusterVolumeSource(spec)
|
source, readOnly := plugin.getGlusterVolumeSource(spec)
|
||||||
return &glusterfsMounter{
|
return &glusterfsMounter{
|
||||||
glusterfs: &glusterfs{
|
glusterfs: &glusterfs{
|
||||||
volName: spec.Name(),
|
volName: spec.Name(),
|
||||||
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,
|
||||||
@ -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) {
|
func (plugin *glusterfsPlugin) newUnmounterInternal(volName string, podUID types.UID, mounter mount.Interface) (volume.Unmounter, error) {
|
||||||
return &glusterfsUnmounter{&glusterfs{
|
return &glusterfsUnmounter{&glusterfs{
|
||||||
volName: volName,
|
volName: volName,
|
||||||
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 {
|
|||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user