From 43b58b8752abaa898f95023ed866bc03e00271ca Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Tue, 2 May 2017 10:13:02 +0800 Subject: [PATCH] CRI: Add ImageFsInfo API --- pkg/kubelet/api/v1alpha1/runtime/api.proto | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pkg/kubelet/api/v1alpha1/runtime/api.proto b/pkg/kubelet/api/v1alpha1/runtime/api.proto index 696051a0c46..b9d369fa9ff 100644 --- a/pkg/kubelet/api/v1alpha1/runtime/api.proto +++ b/pkg/kubelet/api/v1alpha1/runtime/api.proto @@ -90,6 +90,8 @@ service ImageService { // This call is idempotent, and must not return an error if the image has // already been removed. rpc RemoveImage(RemoveImageRequest) returns (RemoveImageResponse) {} + // ImageFSInfo returns information of the filesystem that is used to store images. + rpc ImageFsInfo(ImageFsInfoRequest) returns (ImageFsInfoResponse) {} } message VersionRequest { @@ -964,3 +966,42 @@ message StatusResponse { // Status of the Runtime. RuntimeStatus status = 1; } + +message ImageFsInfoRequest {} + +// UInt64Value is the wrapper of uint64. +message UInt64Value { + // The value. + uint64 value = 1; +} + +// FsInfo contains data about filesystem usage. +message FsInfo { + // The block device name associated with the filesystem. + string device = 1; + // The root directory for the images. + string path = 2; + // CapacityBytes represents the total capacity (bytes) of the filesystems + // underlying storage. + UInt64Value capacity_bytes = 3; + // AvailableBytes represents the storage space available (bytes) for the + // filesystem. + UInt64Value available_bytes = 4; + // UsedBytes represents the bytes used for images on the filesystem. + // This may differ from the total bytes used on the filesystem and may not + // equal CapacityBytes - AvailableBytes. + UInt64Value used_bytes = 5; + // InodesCapacity represents the total inodes in the filesystem. + UInt64Value inodes_capacity = 6; + // InodesAvailable represents the free inodes in the filesystem. + UInt64Value inodes_available = 7; + // InodesUsed represents the inodes used by the images. + // This may not equal InodesCapacity - InodesAvailable because the underlying + // filesystem may also be used for purposes other than storing images. + UInt64Value inodes_used = 8; +} + +message ImageFsInfoResponse { + // filesystem information of images. + FsInfo fs_info = 1; +}