Commit 8255318b authored by Pengfei Ni's avatar Pengfei Ni

Kubelet: do not report used inodes on Windows

parent e1fdaa17
...@@ -45,9 +45,8 @@ func (ds *dockerService) ImageFsInfo(_ context.Context, _ *runtimeapi.ImageFsInf ...@@ -45,9 +45,8 @@ func (ds *dockerService) ImageFsInfo(_ context.Context, _ *runtimeapi.ImageFsInf
filesystems := []*runtimeapi.FilesystemUsage{ filesystems := []*runtimeapi.FilesystemUsage{
{ {
Timestamp: time.Now().UnixNano(), Timestamp: time.Now().UnixNano(),
UsedBytes: &runtimeapi.UInt64Value{Value: fsinfo.Usage}, UsedBytes: &runtimeapi.UInt64Value{Value: fsinfo.Usage},
InodesUsed: &runtimeapi.UInt64Value{Value: 0},
FsId: &runtimeapi.FilesystemIdentifier{ FsId: &runtimeapi.FilesystemIdentifier{
Mountpoint: info.DockerRootDir, Mountpoint: info.DockerRootDir,
}, },
......
...@@ -182,9 +182,11 @@ func (p *criStatsProvider) ImageFsStats() (*statsapi.FsStats, error) { ...@@ -182,9 +182,11 @@ func (p *criStatsProvider) ImageFsStats() (*statsapi.FsStats, error) {
// TODO(yguo0905): Support returning stats of multiple image filesystems. // TODO(yguo0905): Support returning stats of multiple image filesystems.
for _, fs := range resp { for _, fs := range resp {
s := &statsapi.FsStats{ s := &statsapi.FsStats{
Time: metav1.NewTime(time.Unix(0, fs.Timestamp)), Time: metav1.NewTime(time.Unix(0, fs.Timestamp)),
UsedBytes: &fs.UsedBytes.Value, UsedBytes: &fs.UsedBytes.Value,
InodesUsed: &fs.InodesUsed.Value, }
if fs.InodesUsed != nil {
s.InodesUsed = &fs.InodesUsed.Value
} }
imageFsInfo := p.getFsInfo(fs.GetFsId()) imageFsInfo := p.getFsInfo(fs.GetFsId())
if imageFsInfo != nil { if imageFsInfo != nil {
......
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