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

crictl: add metricsp command #1228

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

haircommander
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

which are aliases to each other
currently json and yaml output are supported

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add `crictl metricsp` command, that allows a user to display pod metrics from the CRI

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 2, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 2, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Aug 2, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 2, 2023
@haircommander haircommander force-pushed the metrics branch 2 times, most recently from 154e448 to 5042e58 Compare August 2, 2023 19:13
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Aug 2, 2023
var podMetricsCommand = &cli.Command{
Name: "metricsp",
Aliases: []string{"metrics"},
Usage: "List pod resource usage statistics",
Copy link
Member

Choose a reason for hiding this comment

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

the description is exactly like statsp

Usage: "List pod resource usage statistics",

Should there be any differenece?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, I updated to List pod resource usage metrics which isn't super informative but I think will differentiate enough

Copy link
Member

Choose a reason for hiding this comment

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

we really need to expand on both descriptions. I cannot imagine anybody figuring the difference on their own.

Aliases: []string{"metrics"},
Usage: "List pod resource usage metrics",
UseShortOptionHandling: true,
ArgsUsage: "[ID]",
Copy link
Member

Choose a reason for hiding this comment

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

we don't need the ID, right? It is metrics across all pods


var podMetricsCommand = &cli.Command{
Name: "metricsp",
Aliases: []string{"metrics"},
Copy link
Member

Choose a reason for hiding this comment

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

why do we need this alias? It may be confusing as all pod-specific commands should have p suffix

currently json and yaml output are supported

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
@haircommander haircommander changed the title crictl: add metrics{,p} command crictl: add metricsp command Aug 8, 2023
@haircommander
Copy link
Contributor Author

updated as suggested @SergeyKanzhelev

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev 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 Aug 8, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, SergeyKanzhelev

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 merged commit b9442e6 into kubernetes-sigs:master Aug 8, 2023
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/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

3 participants