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

Display extended resources in node allocated resources #46079

Merged
merged 1 commit into from Mar 28, 2018

Conversation

@xiangpengzhao
Copy link
Member

xiangpengzhao commented May 19, 2017

What this PR does / why we need it:
Displays opaque integer [extended] resources in node allocated resources of command kubectl describe node. This will give users more info about node OIR [extended resources] consumption.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
This is a partially fix of #44271.

Special notes for your reviewer:
This PR

  • only displays allocated OIR [extended resources] details of node, it doesn't display OIR [extended resources] requests/limits for each pod because it's hard to organize format. I tried to print OIR [extended resources] requests/limits of pods, but some strings have been eaten when a line is too long (the output has been separated into two lines by terminal). I think it's because a \t blank can't be show in two lines.
  • uses OIR-foo instead of pod.alpha.kubernetes.io/opaque-int-resource-foo for short.
  • doesn't display the percentage of OIR [extended resources] usage because I think the percentage is not so meaningful.
  • displays each OIR [extended resources] in single rows to be clear.

UPDATE:
Example with default namespace resource:

Non-terminated Pods:         (1 in total)
  Namespace                  Name                     CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ---------                  ----                     ------------  ----------  ---------------  -------------
  default                    rc-nginx-single-krp84    1 (33%)       1 (33%)     512Mi (6%)       512Mi (6%)
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
Resource                 Requests    Limits
  --------               --------    ------
  cpu                    1 (33%)     1 (33%)
  memory                 512Mi (6%)  512Mi (6%)
  kubernetes.io/widgets  111         0

/cc @ConnorDoyle @soltysh

ref #44181

Release note:

Display requests/limits of extended resources in node allocated resources.
@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented May 19, 2017

@k8s-ci-robot k8s-ci-robot assigned ConnorDoyle and soltysh and unassigned ericchiang and ghodss May 19, 2017

@spiffxp

This comment has been minimized.

Copy link
Member

spiffxp commented Jul 10, 2017

/ok-to-test

@pwittrock

This comment has been minimized.

Copy link
Member

pwittrock commented Jul 31, 2017

/unassign

@pwittrock

This comment has been minimized.

Copy link
Member

pwittrock commented Jul 31, 2017

/assign @Random-Liu

@pwittrock

This comment has been minimized.

Copy link
Member

pwittrock commented Jul 31, 2017

/assign @dchen1107

@pwittrock

This comment has been minimized.

Copy link
Member

pwittrock commented Jul 31, 2017

@xiangpengzhao Please add a release note

@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Aug 1, 2017

Editing release note in PR body didn't take effect. Add it manually here.

Display requests/limits of opaque integer resources in node allocated resources.
@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Aug 1, 2017

Release note:

Display requests/limits of opaque integer resources in node allocated resources.
@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Aug 1, 2017

Hmm, none of the ways I tried to add release note works...

@spxtr How can I add a release note in this case? Thanks!

I remember I saw some guy adding release note like this way: #46079 (comment) above.

@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Aug 1, 2017

/release-note

hope this works :)

@soltysh

This comment has been minimized.

Copy link
Contributor

soltysh commented Aug 8, 2017

The change itself looks good, but I'm not sure if this isn't breaking api, since we're adding quite a few additional information. @kubernetes/sig-cli-api-reviews wdyt should we keep that additional data behind a flag or something?

@spiffxp

This comment has been minimized.

Copy link
Member

spiffxp commented Feb 16, 2018

/unassign

@RenaudWasTaken

This comment has been minimized.

Copy link
Member

RenaudWasTaken commented Feb 24, 2018

Can we get this in for 1.10 cc @vishh @smarterclayton ?

@jiayingz

This comment has been minimized.

Copy link
Member

jiayingz commented Mar 27, 2018

/cc @jiayingz

@k8s-ci-robot k8s-ci-robot requested a review from jiayingz Mar 27, 2018

@ConnorDoyle

This comment has been minimized.

Copy link
Member

ConnorDoyle commented Mar 27, 2018

Every now and then I get notifications from this PR and feel a great sadness.

@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Mar 27, 2018

@ConnorDoyle haha... The PR is 🔟 months old. 👶 --> 👴

ping some folks from approvers list: @adohe @smarterclayton @liggitt @mengqiy @deads2k @brendandburns @janetkuo :)

w.Write(LEVEL_0, "Allocated resources:\n (Total limits may be over 100 percent, i.e., overcommitted.)\n CPU Requests\tCPU Limits\tMemory Requests\tMemory Limits\n")
w.Write(LEVEL_1, "------------\t----------\t---------------\t-------------\n")
w.Write(LEVEL_0, "Allocated resources:\n (Total limits may be over 100 percent, i.e., overcommitted.)\n")
w.Write(LEVEL_0, "Resource\tRequests\tLimits\n")

This comment has been minimized.

@liggitt

liggitt Mar 27, 2018

Member

should be LEVEL_1 to get Resource to align with --------, right?

This comment has been minimized.

@xiangpengzhao

xiangpengzhao Mar 28, 2018

Author Member

Good catch! A big 👍 for you :)

@xiangpengzhao xiangpengzhao force-pushed the xiangpengzhao:print-allocated-oir branch from 64b9c4d to bd02b49 Mar 28, 2018

@k8s-ci-robot k8s-ci-robot added approved and removed lgtm labels Mar 28, 2018

@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Mar 28, 2018

@liggitt inline comment addressed. PTAL. Thanks!

@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Mar 28, 2018

/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Mar 28, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ConnorDoyle, dixudx, liggitt, soltysh, spiffxp, vishh, xiangpengzhao

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

@xiangpengzhao

This comment has been minimized.

Copy link
Member Author

xiangpengzhao commented Mar 28, 2018

/retest

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Mar 28, 2018

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

2 similar comments
@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Mar 28, 2018

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Mar 28, 2018

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Mar 28, 2018

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Mar 28, 2018

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 33482dd into kubernetes:master Mar 28, 2018

13 of 14 checks passed

Submit Queue Required Github CI test is not green: pull-kubernetes-e2e-gce
Details
cla/linuxfoundation xiangpengzhao authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

@xiangpengzhao xiangpengzhao deleted the xiangpengzhao:print-allocated-oir branch Mar 28, 2018

@ConnorDoyle

This comment has been minimized.

Copy link
Member

ConnorDoyle commented Mar 28, 2018

🙏🏽 @liggitt !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.