-
Notifications
You must be signed in to change notification settings - Fork 1.5k
KEP-2371: update kep to reflect current state of enhancement #2812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
+ // TODO: Unclear how the remaining fields relate to container stats. Is it filled in cAdvisor? | ||
+ // AvailableBytes represents the storage space available (bytes) for the filesystem. | ||
+ UInt64Value available_bytes = 5; | ||
+ // CapacityBytes represents the total capacity (bytes) of the filesystems underlying storage. | ||
+ UInt64Value capacity_bytes = 6; | ||
+ // InodesFree represents the free inodes in the filesystem. | ||
+ UInt64Value inodes_free = 7; | ||
+ // Inodes represents the total inodes in the filesystem. | ||
+ UInt64Value inodes = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are whole disk metrics, not specific to the writable layer or image fs size. they can be populated by cadvsior who is responsible for monitoring node-level information (whole disk)
=// ContainerStats provides the resource usage statistics for a container. | ||
=message ContainerStats { | ||
= // Information of the container. | ||
+ // Corresponds to the Stats Summary API ContainerStats Name field | ||
= ContainerAttributes attributes = 1; | ||
= // CPU usage gathered from the container. | ||
+ // Corresponds to Stats Summary API ContainerStats CPUStats field | ||
= CpuUsage cpu = 2; | ||
= // Memory usage gathered from the container. | ||
+ // Corresponds to Stats Summary API ContainerStats MemoryStats field | ||
= MemoryUsage memory = 3; | ||
= // Usage of the writable layer. | ||
+ // Corresponds to Stats Summary API ContainerStats Rootfs field | ||
= FilesystemUsage writable_layer = 4; | ||
+ // Stats pertaining to container logs usage of filesystem resources | ||
+ // Logs.UsedBytes is the number of bytes used for the container logs. | ||
+ FilesystemUsage logs = 5; | ||
=} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no changes needed here, just the extension of MemoryUsage and CpuUsage (covered above)
= FilesystemUsage writable_layer = 4; | ||
+ // Stats pertaining to container logs usage of filesystem resources | ||
+ // Logs.UsedBytes is the number of bytes used for the container logs. | ||
+ FilesystemUsage logs = 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logs are the responsibility of the kubelet to watch and collect information for.
@@ -304,7 +304,7 @@ These correspond to some fields of the [ContainerStats](#summary-container-stats | |||
+ // Corresponds to Stats Summary API CPUStats UsageCoreNanoSeconds | |||
= UInt64Value usage_core_nano_seconds = 2; | |||
+ // Total CPU usage (sum of all cores) averaged over the sample window. | |||
+ UInt64Value usage_nano_seconds = 3; | |||
+ UInt64Value usage_nano_cores = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the actual variable name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and matches summary API naming:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "core" unit can be interpreted as CPU core-nanoseconds per second
maybe add ^ that sentence...
// Stats from linux. | ||
LinuxPodSandboxStats linux = 2; | ||
// Stats from windows. | ||
WindowsPodSandboxStats windows = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added two sections for windows and linux as discussed but not added
// Each of these fields will be calculated Kubelet-level | ||
// ProcessStats pertaining to processes. | ||
ProcessStats process = 5; | ||
NetworkUsage network = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memory and cpu have the suffix Usage, make this more consistent
InterfaceStats default_interface = 2; | ||
|
||
repeated InterfaceStats interfaces = 3; | ||
NetworkInterfaceUsage default_interface = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
// InterfaceStats contains resource value data about interface. | ||
type InterfaceStats struct { | ||
// NetworkInterfaceUsage contains resource value data about interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/interface/network interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed :)
after addressing the nits raised earlier, this looks fine. |
// Stats from linux. | ||
LinuxPodSandboxStats linux = 2; | ||
// Stats from windows. | ||
WindowsPodSandboxStats windows = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just leaving note: This message design differs a bit from existing message ContainerStats
in that we have sub messages for stats for windows/linux. existing message ContainerStats
does have separate submessages for windows/linux though.
I prefer to have it this way though since it has more flexibility of allowing to extend stats for windows/linux separately.
Thanks for updating KEP, changes here make sense modulo above small nits. /lgtm |
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
just a nit to add core description..
@@ -304,7 +304,7 @@ These correspond to some fields of the [ContainerStats](#summary-container-stats | |||
+ // Corresponds to Stats Summary API CPUStats UsageCoreNanoSeconds | |||
= UInt64Value usage_core_nano_seconds = 2; | |||
+ // Total CPU usage (sum of all cores) averaged over the sample window. | |||
+ UInt64Value usage_nano_seconds = 3; | |||
+ UInt64Value usage_nano_cores = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "core" unit can be interpreted as CPU core-nanoseconds per second
maybe add ^ that sentence...
Signed-off-by: Peter Hunt <pehunt@redhat.com>
updated with the final nits from kubernetes/kubernetes#102789 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
I've updated this PR to also bump the alpha version to 1.23 |
/lgtm |
/cc @qiutongs |
Signed-off-by: Peter Hunt <pehunt@redhat.com>
dcf007b
to
024717e
Compare
updated the kep.yaml file a bit |
btw @mikebrow I have added you as a reviewer, which I figured was alright because you've already reviewed the CRI changes :) |
|
||
repeated InterfaceStats interfaces = 3; | ||
// NetworkUsage contains data about network resources. | ||
message NetworkUsage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be named NetworkStats
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is mirroring the Cpu and Memory structs: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto#L611-L621
type InterfaceStats struct { | ||
// The name of the interface | ||
// NetworkInterfaceUsage contains resource value data about a network interface. | ||
message NetworkInterfaceUsage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about NetworkInterfaceStats
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above :)
/lgtm |
thanks @haircommander @bobbypage and others for the collaboration. the updates look good to me too. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: derekwaynecarr, haircommander, mikebrow, mrunalp The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This fixes some nits found in the cri stats kep. They're mostly cosmetic:
more detail in each commit