Skip to content

Conversation

@AnishShah
Copy link
Contributor

@AnishShah AnishShah commented Nov 9, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

reducing the container resources used in in-place pod resize tests will help us run many subtests in parallel on a single node.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 9, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 9, 2024
@AnishShah AnishShah changed the title test: reduce container resources in in-place pod resize tests [FG:InPlacePodVerticalScaling] reduce container resources in tests Nov 10, 2024
Copy link
Member

@tallclair tallclair left a comment

Choose a reason for hiding this comment

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

Thanks for this change, it makes sense to do regardless.

Can we define constants with meaningful names to use for all these values instead? For example:

const(
originalCPU = 20
originalCPULimit = 30
reducedCPU = 10
reducedCPULimit = 20
increasedCPU = 30
increasedCPULimit = 40

// etc
)
// For multi-container test cases
func offsetContainerCPUResources(index, value) int64 {
  return value + 2 * index
}

Comment on lines 162 to 163
{"name":"c1", "resources":{"requests":{"cpu":"14m","memory":"50Mi"},"limits":{"cpu":"14m","memory":"50Mi"}}},
{"name":"c2", "resources":{"requests":{"cpu":"15m","memory":"24Mi"},"limits":{"cpu":"15m","memory":"24Mi"}}},
Copy link
Member

Choose a reason for hiding this comment

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

Are there any issues with requesting increments of 1m CPU? I know there might be rounding issues in determining shares.

Actually, now that I think about it, we might need to investigate the way we determine if a resize is pending to account for rounding issues...

Copy link
Member

Choose a reason for hiding this comment

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

I ran some tests around this: creating & resizing a pod with 20 containers requesting values of 1m - 20m, and didn't hit any rounding issues (though I did discover #128769)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 13, 2024
@AnishShah AnishShah force-pushed the parallel-ippr-test branch 3 times, most recently from a26e7a3 to 56eb32c Compare November 15, 2024 03:08
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2024
@AnishShah AnishShah force-pushed the parallel-ippr-test branch 2 times, most recently from 91caca3 to f98c25d Compare November 15, 2024 04:55
@SergeyKanzhelev
Copy link
Member

/assign @tallclair

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 20, 2024
},
{
name: "Guaranteed QoS pod, one container - increase CPU & memory with an extended resource",
containers: []e2epod.ResizableContainerInfo{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we parallelize this test case that modifies nodes for an extended resource? Are there any side effects to other tests?

Copy link
Contributor Author

@AnishShah AnishShah Dec 9, 2024

Choose a reason for hiding this comment

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

Hmm. Good catch. So far I do not see any side-effects because we have just one test for extended resource. I expect this to cause an issue in future though if we had multiple similar tests.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2024
@AnishShah
Copy link
Contributor Author

/test pull-kubernetes-node-kubelet-serial-podresize
/test pull-kubernetes-e2e-inplace-pod-resize-containerd-main-v2

@AnishShah
Copy link
Contributor Author

/test pull-kubernetes-node-kubelet-serial-podresize
/test pull-kubernetes-e2e-inplace-pod-resize-containerd-main-v2

@AnishShah
Copy link
Contributor Author

/test pull-kubernetes-node-kubelet-serial-podresize
/test pull-kubernetes-e2e-inplace-pod-resize-containerd-main-v2

reducing the container resources used in in-place pod resize tests will
help us run tests in parallel.
@AnishShah
Copy link
Contributor Author

/test pull-kubernetes-node-kubelet-serial-podresize
/test pull-kubernetes-e2e-inplace-pod-resize-containerd-main-v2

Copy link
Member

@tallclair tallclair left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 573fad6699243992f1f5a37b8db199c2e1915ef5

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AnishShah, tallclair

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 Dec 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit ce31c0f into kubernetes:master Dec 13, 2024
15 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Dec 13, 2024
@AnishShah AnishShah deleted the parallel-ippr-test branch December 13, 2024 20:20
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants