-
Notifications
You must be signed in to change notification settings - Fork 460
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
Conversation
154e448
to
5042e58
Compare
cmd/crictl/pod_metrics.go
Outdated
var podMetricsCommand = &cli.Command{ | ||
Name: "metricsp", | ||
Aliases: []string{"metrics"}, | ||
Usage: "List pod resource usage statistics", |
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 description is exactly like statsp
cri-tools/cmd/crictl/pod_stats.go
Line 52 in 94d44a2
Usage: "List pod resource usage statistics", |
Should there be any differenece?
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.
good call, I updated to List pod resource usage metrics
which isn't super informative but I think will differentiate enough
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.
we really need to expand on both descriptions. I cannot imagine anybody figuring the difference on their own.
cmd/crictl/pod_metrics.go
Outdated
Aliases: []string{"metrics"}, | ||
Usage: "List pod resource usage metrics", | ||
UseShortOptionHandling: true, | ||
ArgsUsage: "[ID]", |
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.
we don't need the ID, right? It is metrics across all pods
cmd/crictl/pod_metrics.go
Outdated
|
||
var podMetricsCommand = &cli.Command{ | ||
Name: "metricsp", | ||
Aliases: []string{"metrics"}, |
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.
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>
updated as suggested @SergeyKanzhelev |
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
[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 |
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?