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

Graduate PodTopologySpread to Beta #88105

Merged
merged 1 commit into from Feb 17, 2020
Merged

Conversation

@Huang-Wei
Copy link
Member

Huang-Wei commented Feb 13, 2020

What type of PR is this?

/kind feature
/sig scheduling

What this PR does / why we need it:

This PR includes the necessary change to enable featuregate EvenPodsSpread to be beta, by default. Additionally, e2e tests covering basic happy paths have been added.

  • Enable PodTopologySpread in kube_features.go
  • PreFilter & Filter
  • PreScore & Score
  • Preemption

Which issue(s) this PR fixes:

Fixes #88168

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

The feature PodTopologySpread (featuregate `EvenPodsSpread`) has been enabled by default in 1.18.

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

 - [KEP]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-scheduling/20190221-pod-topology-spread.md
@k8s-ci-robot k8s-ci-robot requested review from dchen1107 and wgliang Feb 13, 2020
@Huang-Wei Huang-Wei force-pushed the Huang-Wei:pts-e2e branch 4 times, most recently from 037c364 to 3c460a8 Feb 13, 2020
@Huang-Wei Huang-Wei changed the title [WIP] E2E tests for PodTopologySpread E2E tests for PodTopologySpread Feb 14, 2020
@Huang-Wei

This comment has been minimized.

Copy link
Member Author

Huang-Wei commented Feb 14, 2020

Ready for review.

/cc @ahg-g @alculquicondor

@k8s-ci-robot k8s-ci-robot requested review from ahg-g and alculquicondor Feb 14, 2020
@Huang-Wei Huang-Wei removed request for dchen1107 and wgliang Feb 14, 2020
@alculquicondor

This comment has been minimized.

Copy link
Member

alculquicondor commented Feb 14, 2020

I didn't review yet, but this should have a release note.

// force it to update
nodeCopy.ResourceVersion = "0"
ginkgo.By(fmt.Sprintf("Apply 10 fake resource to node %v.", node.Name))
nodeCopy.Status.Capacity[fakeRes] = resource.MustParse("10")

This comment has been minimized.

Copy link
@ahg-g

ahg-g Feb 14, 2020

Member

is this reliable? will kubelet erase this since no such resource actually exist?

This comment has been minimized.

Copy link
@Huang-Wei

Huang-Wei Feb 14, 2020

Author Member

will kubelet erase this since no such resource actually exist?

For extended resources, no. We used to exercise this pattern for another test here:

var _ = SIGDescribe("PreemptionExecutionPath", func() {

test/e2e/scheduling/preemption.go Outdated Show resolved Hide resolved
Copy link
Member

ahg-g left a comment

Since we are still not GA, I propose we up the weight of the PodTopologySpread score plugin. PodTopologySpread expresses explicit user intent that I think should have higher weight than scoring generic functions (like NodeResources or ImageLocality).

}

// Make the nodes have balanced cpu,mem usage.
err := createBalancedPodForNodes(f, cs, ns, nodes, podRequestedResource, 0.5)

This comment has been minimized.

Copy link
@ahg-g

ahg-g Feb 14, 2020

Member

I know we need this so that the "node resource" plugin doesn't influence the score, but this is going to cause flakes because a pod created by a previous test may get deleted after this function is called, and so breaking the "balanced" assumption. I don't have a better suggestion how to fix this though.

Giving PodTopologySpread a higher priority should make this less important.

This comment has been minimized.

Copy link
@Huang-Wei

Huang-Wei Feb 14, 2020

Author Member

Exactly like what I mentioned in #88174 (comment). And this is why I hesitated to add this score test in e2e - you can't adjust the default weight (which is 1) for a given e2e env.

@Huang-Wei Huang-Wei force-pushed the Huang-Wei:pts-e2e branch from 3c460a8 to c93dffd Feb 15, 2020
@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Feb 16, 2020

Please update the issue title, something like: "Graduate PodTopologySpread to Beta".

Otherwise looks good to me, let's get the features files approved.

@Huang-Wei Huang-Wei changed the title E2E tests for PodTopologySpread Graduate PodTopologySpread to Beta Feb 16, 2020
@Huang-Wei

This comment has been minimized.

Copy link
Member Author

Huang-Wei commented Feb 16, 2020

@ahg-g Title updated.

You might be able to have the privilege to approve the feature files, due to #88128.

@ahg-g

This comment has been minimized.

Copy link
Member

ahg-g commented Feb 16, 2020

/approve
/lgtm

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 16, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, Huang-Wei

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

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Feb 17, 2020

/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 or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit 48def7e into kubernetes:master Feb 17, 2020
17 of 18 checks passed
17 of 18 checks passed
tide Not mergeable. Retesting: pull-kubernetes-bazel-test
Details
cla/linuxfoundation Huang-Wei authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-kind-ipv6-parallel Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-alpha-features Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-e2e-kind-ipv6 Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Feb 17, 2020
@Huang-Wei Huang-Wei deleted the Huang-Wei:pts-e2e branch Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.