Skip to content
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

KEP-2371: update kep to reflect current state of enhancement #2812

Merged
merged 6 commits into from
Sep 9, 2021

Conversation

haircommander
Copy link
Contributor

  • One-line PR description:
    This fixes some nits found in the cri stats kep. They're mostly cosmetic:
  • drops some TODOs (as we've figured out what to do)
  • Updates some spacing
  • Fixes some names to be more clear/consistent

more detail in each commit

  • Other comments:

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 7, 2021
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 7, 2021
Copy link
Contributor

@mrunalp mrunalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2021
Comment on lines -353 to -361
+ // 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;
Copy link
Contributor Author

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)

Comment on lines -367 to -384
=// 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;
=}
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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...

Comment on lines +417 to +421
// Stats from linux.
LinuxPodSandboxStats linux = 2;
// Stats from windows.
WindowsPodSandboxStats windows = 3;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor Author

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.
Copy link
Member

@bobbypage bobbypage Jul 7, 2021

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed :)

@derekwaynecarr
Copy link
Member

after addressing the nits raised earlier, this looks fine.

// Stats from linux.
LinuxPodSandboxStats linux = 2;
// Stats from windows.
WindowsPodSandboxStats windows = 3;
Copy link
Member

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.

@bobbypage
Copy link
Member

bobbypage commented Jul 7, 2021

Thanks for updating KEP, changes here make sense modulo above small nits.

/lgtm

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2021
@bobbypage
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 7, 2021
Copy link
Member

@mikebrow mikebrow left a 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;
Copy link
Member

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>
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2021
@haircommander
Copy link
Contributor Author

updated with the final nits from kubernetes/kubernetes#102789

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mrunalp
Copy link
Contributor

mrunalp commented Jul 8, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 27, 2021
@haircommander
Copy link
Contributor Author

I've updated this PR to also bump the alpha version to 1.23

@bobbypage
Copy link
Member

/lgtm
/assign @mrunalp

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 27, 2021
@bobbypage
Copy link
Member

/cc @qiutongs

Signed-off-by: Peter Hunt <pehunt@redhat.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2021
@haircommander
Copy link
Contributor Author

updated the kep.yaml file a bit

@haircommander
Copy link
Contributor Author

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 {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type InterfaceStats struct {
// The name of the interface
// NetworkInterfaceUsage contains resource value data about a network interface.
message NetworkInterfaceUsage {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about NetworkInterfaceStats?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above :)

@mrunalp
Copy link
Contributor

mrunalp commented Sep 8, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 8, 2021
@derekwaynecarr
Copy link
Member

thanks @haircommander @bobbypage and others for the collaboration.

the updates look good to me too.

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit f4de431 into kubernetes:master Sep 9, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants