mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Adding metrics support to local volume
Adding metrics support to local volume plugin
This commit is contained in:
parent
d368afd845
commit
fb67f1189b
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user