profile
viewpoint
Wei Huang Huang-Wei @IBM San Jose, CA Kubernetes SIG-Scheduling

Huang-Wei/sample-scheduler-extender 21

a sample to showcase how to create a k8s scheduler extender

Huang-Wei/shared-loadbalancer 18

Demo for 2018 KubeCon NA

Huang-Wei/2014 3

2014世界杯竞猜

Huang-Wei/k8s-manifests 3

samples of various kinds of k8s yamls

Huang-Wei/kubecon-demo 1

demo code for 2018 Kubecon Europe

Huang-Wei/community 0

Kubernetes community content

Huang-Wei/enhancements 0

Features tracking repo for Kubernetes releases

pull request commentkubernetes/website

Document the changes of scheduler PostFilter extension point

@sftim @alculquicondor Addressed most of the comments except for the release notes part. PTAL.

Huang-Wei

comment created time in 2 hours

push eventHuang-Wei/website

Miquel Ortega

commit sha f3e22cbcac21fa14b001f6a89453621db0c93580

First big translation on doc/contribute/start

view details

Miquel Ramon Ortega Tido

commit sha ee9124e74a60e353ae567ff9e6d0044922702817

Finished first translation on doc/contribute/start

view details

wolmi

commit sha e05930dce2cc6a8c694f668a5a596faf9b01e732

Apply suggestions from code review Co-Authored-By: Victor Morales <chipahuac@hotmail.com>

view details

wolmi

commit sha 3a591974462074133aa6d3d724e4c413fb11d7e2

Removed new line that could break the link

view details

wolmi

commit sha 732effb79afbc0e549f0bd73e2e09605342f9249

Apply suggestions from code review Co-Authored-By: Rael Garcia <rael@rael.io>

view details

wolmi

commit sha 58c73205bd1cdd70718869006354251c74fc9819

Removed new-line to fix preview

view details

wolmi

commit sha c30d1f203e31f2a8c9e1b6da697a1117b591836f

Apply suggestions from code review Co-Authored-By: Victor Morales <chipahuac@hotmail.com>

view details

lou-lan

commit sha 9abcf6805bc513ee0e1a262a265e2e35d1362b6a

Fix minikube image 'project:hello-minikube-zero-install' has been suspended.

view details

Weiping Cai

commit sha 5513c60b543026641e72905bec44ce58b343702b

add define interdependent environment variables page Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>

view details

Weiping Cai

commit sha 1253c3b39e632ea86d18b1d08534feb0192c0abf

fix UNCHANGE_REFERENCE to UNCHANGED_REFERENCE,and use you to replace we Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>

view details

merishlalla

commit sha 730f645283d7ef085f57f121392775beea0bc500

Update the correct values for allocated resources In the example, Memory limits and Memory requests per namespace don't add up correctly to the total displayed under Total requests.

view details

Cweiping

commit sha e3f6541d0a59dcf00b9be0f58e45c400af82d44a

Apply suggestions from code review Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>

view details

nevermyuk

commit sha d2d289be631f8e76d0b850d07e2d9e7ccb873135

Add endpoint into glossary Edit definition and add tooltips for endpoint Update content/en/docs/reference/glossary/endpoint.md Co-authored-by: Tim Bannister <tim@scalefactory.com> Update definition Update content/en/docs/reference/glossary/endpoint.md Co-authored-by: Tim Bannister <tim@scalefactory.com> Change tag from fundamentals to networking

view details

Weiping Cai

commit sha 506a57849b53342073690ea3ca84d29763436373

uograde dependent-envars.yaml leave out env name Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>

view details

Qiming Teng

commit sha faa5a441fdc647dc2a1fe448c80a556c4a1b19fd

Fix example tests for English site

view details

Bowei Du

commit sha 7e25d754133d06cd8db9860387163b4d200b3af9

Add version skew policy for kube-proxy

view details

Tim Bannister

commit sha d9f82c9500754555ac256b7fa4adde251b1b7f65

Explain ConfigMap volume source items array The existing ConfigMap concept incorrectly states that you must use different ConfigMap objects if you want to configure both environment variables and file-like configuration items at the same time. Reword to give the correct advice.

view details

Michael Taufen

commit sha 51b52c423dce012c6283883a09e26b38574d0371

add ServiceAccountIssuerDiscovery to feature gates docs

view details

skieffer

commit sha 08f49fa58e7e2cef2a9a8e84f2bd9d7dc2a08a7d

Update kops.md Add a link describing the IAM permissions `kops` requires in order to do its job.

view details

Qiming Teng

commit sha 69a162dc2c224e734828885c48a99a3827ce5a11

Revised README for English examples

view details

push time in 2 hours

Pull request review commentkubernetes/website

Document the changes of scheduler PostFilter extension point

 node, the scheduler will call filter plugins in their configured order. If any filter plugin marks the node as infeasible, the remaining plugins will not be called for that node. Nodes may be evaluated concurrently. +### PostFilter {#post-filter}++These plugins are called after Filter phase, but only when there is no feasible

SG.

Huang-Wei

comment created time in 2 hours

pull request commentkubernetes/website

Document the changes of scheduler PostFilter extension point

Is it important that readers specifically understand how to disable preemption?

I'd say 99% (or even more) of the users wouldn't try disabling this. So I'm fine with removing the whole section.

Huang-Wei

comment created time in 2 hours

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

Thanks, please squash

@ahg-g Needs to wait for #92876 to be merged first. (not sure why it stays submerged for days...)

Huang-Wei

comment created time in 3 hours

issue commentkubernetes/kubernetes

Improve user experience of using scheduler policies

@JamesMurkin Your understanding is correct, and I feel the pain. It's a design glitch in policy API, at least in UX side.

We have a better-designed scheduler configuration API (1.18+), where it has explicit Enable and Disable fields. So users can easily accomplish the following requirements:

  • enable/disable partial plugins, without modifying defaults
  • replace a plugin with another
  • rearrange the order of plugins
  • simply disable all defaults (using a special * character) without naming all of them

May I know which k8s version you're running on? Is it possible to migrate to Kubernetes 1.18+ to give a try? In 1.18, the API is v1alpha2 and v1beta1 in 1.19.

BTW: Policy API will be deprecated in the future, so we may just maintain it by fixing bugs.

JamesMurkin

comment created time in 3 hours

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 29d9d9cdbad9aef423a19305ef344759353d1bd2

fixup: fix more namings

view details

push time in 4 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func selectVictimsOnNode( 	return victims, numViolatingVictim, true } +// PreNominateCandidate does some preparation work before nominating the candidate winner:+// - Evict the victim pods+// - Reject the victim pods if they are in waitingPod map+// - Clear the low-priority pods' nominatedNodeName status if needed+func PreNominateCandidate(c Candidate, fh framework.FrameworkHandle, cs kubernetes.Interface, pod *v1.Pod) error {

ok, "prepare" should be good enough.

Huang-Wei

comment created time in 4 hours

push eventHuang-Wei/kubernetes

Wei Huang

commit sha b80318a7c1e8d10c95eadb08173a4910c0fae0d3

fixup: fix more namings

view details

push time in 5 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func selectVictimsOnNode( 	return victims, numViolatingVictim, true } +// PreNominateCandidate does some preparation work before nominating the candidate winner:+// - Evict the victim pods+// - Reject the victim pods if they are in waitingPod map+// - Clear the low-priority pods' nominatedNodeName status if needed+func PreNominateCandidate(c Candidate, fh framework.FrameworkHandle, cs kubernetes.Interface, pod *v1.Pod) error {

Given that the only thing we did after this function is nominating the candidate, I think "PreNominate" is more descriptive than "Prepare".

Huang-Wei

comment created time in 5 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy // other pods with the same priority. The nominated pod prevents other pods from // using the nominated resources and the nominated pod could take a long time // before it is retried after many other pending pods.-func preempt(ctx context.Context, fh framework.FrameworkHandle, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {-	cs := fh.ClientSet()+func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {+	cs := pl.fh.ClientSet()+	ph := pl.fh.PreemptHandle()+	nodeLister := pl.fh.SnapshotSharedLister().NodeInfos()++	// 0) Fetch the latest version of <pod>. 	// TODO(Huang-Wei): get pod from informer cache instead of API server. 	pod, err := util.GetUpdatedPod(cs, pod) 	if err != nil { 		klog.Errorf("Error getting the updated preemptor pod object: %v", err) 		return "", err 	} -	if !podEligibleToPreemptOthers(pod, fh.SnapshotSharedLister().NodeInfos(), m[pod.Status.NominatedNodeName]) {+	// 1) Ensure the preemptor is eligible to preempt other pods.+	if !PodEligibleToPreemptOthers(pod, nodeLister, m[pod.Status.NominatedNodeName]) { 		klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name) 		return "", nil 	}-	allNodes, err := fh.SnapshotSharedLister().NodeInfos().List()++	// 2) Find all preemption candidates.+	candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)+	if err != nil || len(candidates) == 0 {+		return "", err+	}++	// 3) Interact with registered Extenders to filter out some candidates if needed.+	candidates, err = CallExtenders(ph.Extenders(), pod, nodeLister, candidates) 	if err != nil { 		return "", err 	}++	// 4) Find the best candidate.+	bestCandidate := SelectBestCandidate(candidates)+	if bestCandidate == nil || len(bestCandidate.Name()) == 0 {+		return "", nil+	}++	// 5) Perform preparation work before nominating the candidate winner.

"winner" is informal huh :)

Huang-Wei

comment created time in 5 hours

pull request commentkubernetes/website

Document the changes of scheduler PostFilter extension point

however, Concepts pages are not tied to a specific version of Kubernetes.

I understand this. But in this case, the current wordings are already stale, in the context of 1.19 release. So do think it's better to add a tabbed widget to point out different steps to disable preemption upon different releases?

When you want to communicate a specific change in behavior between releases, the release notes are the right place for that and the Concepts section is not the right place

Given that we only document major API changes between versions (like alpha to beta, beta to GA), and a version may span multiple releases, IMO it's a supplement to release notes guiding users how to upgrade. For now, we document the changes from alpha to beta, and in the future, we only need to document changes from beta to GA. And yes, at some time, if alpha/beta version is basically not used, we can remove them.

Huang-Wei

comment created time in 5 hours

Pull request review commentkubernetes/website

Document the changes of scheduler PostFilter extension point

 PriorityClasses have the option to set `preemptionPolicy: Never`. This will prevent pods of that PriorityClass from preempting other pods. {{< /note >}} -Preemption is controlled by a kube-scheduler flag `disablePreemption`, which is-set to `false` by default.-If you want to disable preemption despite the above note, you can set-`disablePreemption` to `true`.--This option is available in component configs only and is not available in-old-style command line options. Below is a sample component config to disable-preemption:+Starting from Kubernetes 1.19, Preemption is controlled by a kube-scheduler+plugin: `DefaultPreemption`, which is enabled by default.+If you want to disable preemption despite the above note, below is a sample+component config:

@sftim it's still relevant - in the before, preemption can be disabled via a CLI argument, but now it should be disabled by scheduler configuration.

Huang-Wei

comment created time in 5 hours

Pull request review commentkubernetes/website

Document the changes of scheduler PostFilter extension point

 node, the scheduler will call filter plugins in their configured order. If any filter plugin marks the node as infeasible, the remaining plugins will not be called for that node. Nodes may be evaluated concurrently. +### PostFilter {#post-filter}++These plugins are called after Filter phase, but only when there is no feasible

It was, but later we changed to only invoke PostFilter plugins only when Filter failed. Say if there is any feasible node after Filter(), PostFilter() won't be called at all.

Huang-Wei

comment created time in 5 hours

issue commentkubernetes-sigs/scheduler-plugins

Define release and golang vendor strategy

I just thought our usage is "fake semvar"

Yes, while complying with semver semantics, we have the right to definite the real-world meaning of it.

Are you looking for more input or ready to tag a version now? :)

Yes, feedback is always appreciated. And we may do the first cut when k8s v1.19.0 is out (end of August).

Huang-Wei

comment created time in 6 hours

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/retest

Huang-Wei

comment created time in 6 hours

push eventHuang-Wei/kubernetes

Zida

commit sha bc56cf45a5c93e367fd9dfcaadea44ba099cb11d

Fix comment typos in prober

view details

Ed Bartosh

commit sha e6192a87af7368ff108b4ae2ca9f69a961c1b8b2

Remove unused e2e test image config node_e2e tests use benchmark image configs from test-infra repository This one is outdated and not used anywhere.

view details

lsytj0413

commit sha 64094899b03ce093edfbc93131a66a9aef22a046

test(e2e_node): Parallelize prepulling all images in `e2e_node` tests

view details

SataQiu

commit sha e5d1dc953ce636886a7989378148eade97500a50

honor --cache-dir so that server resources and http-cache data are stored in the same location Signed-off-by: SataQiu <1527062125@qq.com>

view details

SataQiu

commit sha 84d177b6d4abab6193dc05302ad54378a0d34aec

kubectl: fix the bug that kubectl autoscale does not honor --name flag Signed-off-by: SataQiu <1527062125@qq.com>

view details

SataQiu

commit sha 8d37c3b8f24478fe36da23f3ac453767f438e80b

kubectl: fix the bug that kubectl scale does not honor --timeout flag Signed-off-by: SataQiu <1527062125@qq.com>

view details

Amim Knabben

commit sha 0ed41c3f1036785c6c86dd35d20412c8387cf382

Deprecating --bootstrap-checkpoint-path flag

view details

Wen Gao

commit sha b21b298074d2fdcec504db738a0c29e24de34fee

add arg for noderesourcesfit plugin to support ignore a group of extended resources

view details

fatedier

commit sha 6c2562a579b2356c54898d262ec578d5fded1e24

fix 68211: modified subpath configmap mount fails when container restart

view details

fatedier

commit sha 3089411183e9fc98fef61c93cbec19b726f2ab7f

autogen files update

view details

Aurélien Baumann

commit sha 484361a1d1eb1e7d37569d0bbe7f3a6ca0de986b

Remove the dependency between create clusterrolebinding command and generators

view details

Stephen Heywood

commit sha 832e4718da86a7c2bbf4cdb7a992dbb5fdc6cf92

Ensure that a set of pods can be removed by delete collection

view details

Jordan Liggitt

commit sha b432793878e6f08203add8cf9f3170d7ada882b3

Reference listmeta in CR openapi

view details

Aaron Crickenberger

commit sha 9fb05616ca966c107ff467c0cdb02efd12fb6d7d

Drop WatchSequenceEventVerifier from configmap lifecycle test Collecting events in a certain order and then verifying the order in which they were collected feels redundant.

view details

Aaron Crickenberger

commit sha 1048dddc3689b93d0b7ea85bd202b231ed21a453

For grins, make the watch checks very detailed So we know we're not just seeing an arbitrary watch event, we're seeing _the_ watch event that describes the results of our actions

view details

Aaron Crickenberger

commit sha 4582e26ae17a80bbda8af6af9bde72f3b220041d

Now use the stock watchtools.Until By passing in the same initial resource version each time, we get all watch events from the beginning each time.

view details

Aaron Crickenberger

commit sha 0a869ac043c37728573f725ba2347c1b491de57e

Use different resource versions each time In this way, we avoid having to skip over "stale" watch events. The downside is having to keep track of the previous resource version.

view details

Aaron Crickenberger

commit sha 121676e22007f23cddd1b19cce60680269daacfc

Drop the use of watchtools The thing is, for this test at least, I'm pretty sure there's nothing we need to wait on. Instead of waiting for a deleted event, we will relist configmaps and expect 0, to confirm the deletion took effect

view details

Aaron Crickenberger

commit sha 225e7c75b56cfbdd69d1420a2b42ecee0eefc8e4

Reorder checks slightly, add a list-by-namespace call Now the test covers 6 different api calls - verify create with a get - verify patch with a list (all namespaces) - verify delete with a list (single namespace)

view details

Stephen Heywood

commit sha eb8ddc464ae2f33c33049e85295055db33126071

Add check on deleteCollection, improve logging

view details

push time in 8 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy // other pods with the same priority. The nominated pod prevents other pods from // using the nominated resources and the nominated pod could take a long time // before it is retried after many other pending pods.-func preempt(ctx context.Context, fh framework.FrameworkHandle, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {-	cs := fh.ClientSet()+func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {+	cs := pl.fh.ClientSet()+	ph := pl.fh.PreemptHandle()+	nodeLister := pl.fh.SnapshotSharedLister().NodeInfos()++	// 0) Fetch the latest version of <pod>. 	// TODO(Huang-Wei): get pod from informer cache instead of API server. 	pod, err := util.GetUpdatedPod(cs, pod) 	if err != nil { 		klog.Errorf("Error getting the updated preemptor pod object: %v", err) 		return "", err 	} -	if !podEligibleToPreemptOthers(pod, fh.SnapshotSharedLister().NodeInfos(), m[pod.Status.NominatedNodeName]) {-		klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name)-		return "", nil+	// 1) Find all preemption candidates.+	candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)+	if err != nil || len(candidates) == 0 {+		return "", err 	}-	allNodes, err := fh.SnapshotSharedLister().NodeInfos().List()++	// 2) Interact with registered Extenders to filter out some candidates if needed.+	candidates, err = CallPreemptExtenders(ph.Extenders(), pod, nodeLister, candidates) 	if err != nil { 		return "", err 	}++	// 3) Find the best candidate.+	bestCandidate := SelectBestCandidate(candidates)+	if bestCandidate == nil || len(bestCandidate.Name()) == 0 {+		return "", nil+	}++	// 4) Apply the candidate winner.+	if err := ApplyCandidate(bestCandidate, pl.fh, cs, pod); err != nil {+		return "", err+	}++	return bestCandidate.Name(), nil+}++// FindCandidates calculates a slice of preemption candidates.+// Each candidate is executable to make the given <pod> schedulable.+func FindCandidates(ctx context.Context, cs kubernetes.Interface, state *framework.CycleState, pod *v1.Pod,+	m framework.NodeToStatusMap, ph framework.PreemptHandle, nodeLister framework.NodeInfoLister,+	pdbLister policylisters.PodDisruptionBudgetLister) ([]Candidate, error) {+	if !podEligibleToPreemptOthers(pod, nodeLister, m[pod.Status.NominatedNodeName]) {

SGTM. Users may customize podEligibleToPreemptOthers as well.

Huang-Wei

comment created time in 9 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy // other pods with the same priority. The nominated pod prevents other pods from // using the nominated resources and the nominated pod could take a long time // before it is retried after many other pending pods.-func preempt(ctx context.Context, fh framework.FrameworkHandle, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {-	cs := fh.ClientSet()+func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {+	cs := pl.fh.ClientSet()+	ph := pl.fh.PreemptHandle()+	nodeLister := pl.fh.SnapshotSharedLister().NodeInfos()++	// 0) Fetch the latest version of <pod>. 	// TODO(Huang-Wei): get pod from informer cache instead of API server. 	pod, err := util.GetUpdatedPod(cs, pod) 	if err != nil { 		klog.Errorf("Error getting the updated preemptor pod object: %v", err) 		return "", err 	} -	if !podEligibleToPreemptOthers(pod, fh.SnapshotSharedLister().NodeInfos(), m[pod.Status.NominatedNodeName]) {-		klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name)-		return "", nil+	// 1) Find all preemption candidates.+	candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)+	if err != nil || len(candidates) == 0 {+		return "", err 	}-	allNodes, err := fh.SnapshotSharedLister().NodeInfos().List()++	// 2) Interact with registered Extenders to filter out some candidates if needed.+	candidates, err = CallPreemptExtenders(ph.Extenders(), pod, nodeLister, candidates) 	if err != nil { 		return "", err 	}++	// 3) Find the best candidate.+	bestCandidate := SelectBestCandidate(candidates)+	if bestCandidate == nil || len(bestCandidate.Name()) == 0 {

Usually no, just as an extra safety check.

Huang-Wei

comment created time in 9 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy // other pods with the same priority. The nominated pod prevents other pods from // using the nominated resources and the nominated pod could take a long time // before it is retried after many other pending pods.-func preempt(ctx context.Context, fh framework.FrameworkHandle, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {-	cs := fh.ClientSet()+func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {+	cs := pl.fh.ClientSet()+	ph := pl.fh.PreemptHandle()+	nodeLister := pl.fh.SnapshotSharedLister().NodeInfos()++	// 0) Fetch the latest version of <pod>. 	// TODO(Huang-Wei): get pod from informer cache instead of API server. 	pod, err := util.GetUpdatedPod(cs, pod) 	if err != nil { 		klog.Errorf("Error getting the updated preemptor pod object: %v", err) 		return "", err 	} -	if !podEligibleToPreemptOthers(pod, fh.SnapshotSharedLister().NodeInfos(), m[pod.Status.NominatedNodeName]) {-		klog.V(5).Infof("Pod %v/%v is not eligible for more preemption.", pod.Namespace, pod.Name)-		return "", nil+	// 1) Find all preemption candidates.+	candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)+	if err != nil || len(candidates) == 0 {+		return "", err 	}-	allNodes, err := fh.SnapshotSharedLister().NodeInfos().List()++	// 2) Interact with registered Extenders to filter out some candidates if needed.+	candidates, err = CallPreemptExtenders(ph.Extenders(), pod, nodeLister, candidates) 	if err != nil { 		return "", err 	}++	// 3) Find the best candidate.+	bestCandidate := SelectBestCandidate(candidates)+	if bestCandidate == nil || len(bestCandidate.Name()) == 0 {+		return "", nil+	}++	// 4) Apply the candidate winner.+	if err := ApplyCandidate(bestCandidate, pl.fh, cs, pod); err != nil {+		return "", err+	}++	return bestCandidate.Name(), nil+}++// FindCandidates calculates a slice of preemption candidates.+// Each candidate is executable to make the given <pod> schedulable.

Agree with @denkensk - the pod is made schedulable with a cost of evicting victims. "is schedulable" didn't highlight that.

Huang-Wei

comment created time in 9 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func dryRunPreemption(ctx context.Context, fh framework.PreemptHandle, state *fr 				Pods:             pods, 				NumPDBViolations: int64(numPDBViolations), 			}-			s := strategy{-				victims:           &victims,-				nominatedNodeName: nodeInfoCopy.Node().Name,+			c := candidate{+				victims: &victims,+				name:    nodeInfoCopy.Node().Name, 			}-			strategies = append(strategies, &s)+			candidates = append(candidates, &c) 			resultLock.Unlock() 		} 	} 	parallelize.Until(ctx, len(potentialNodes), checkNode)-	return strategies+	return candidates } -// CallExtenders call given <extenders> to filter out <strategies>, and return a filtered strategies.-// We will only check <strategies> with extenders that support preemption.+// CallPreemptExtenders call given <extenders> to filter out <candidates>, and return a filtered candidates.+// We will only check <candidates> with extenders that support preemption. // Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated // node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles.-func CallExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister,-	strategies []Strategy) ([]Strategy, error) {+func CallPreemptExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister,

I think FindCandidatesWithExtenders is a bit verbose... I'd like to revert to CallExtenders.

Huang-Wei

comment created time in 9 hours

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func (pl *DefaultPreemption) preempt(ctx context.Context, state *framework.Cycle 		return "", err 	} -	// 1) Calculate all Strategy candidates.-	strategies, err := CalcStrategies(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)-	if err != nil || len(strategies) == 0 {+	// 1) Find all preemption candidates.+	candidates, err := FindCandidates(ctx, cs, state, pod, m, ph, nodeLister, pl.pdbLister)+	if err != nil || len(candidates) == 0 { 		return "", err 	} -	// 2) Interact with registered Extenders.-	strategies, err = CallExtenders(ph.Extenders(), pod, nodeLister, strategies)+	// 2) Interact with registered Extenders to filter out some candidates if needed.+	candidates, err = CallPreemptExtenders(ph.Extenders(), pod, nodeLister, candidates) 	if err != nil { 		return "", err 	} -	// 3) Find the best strategy.-	strategy := PickStrategy(strategies)-	if strategy == nil || len(strategy.NominatedNodeName()) == 0 {+	// 3) Find the best candidate.+	bestCandidate := SelectBestCandidate(candidates)+	if bestCandidate == nil || len(bestCandidate.Name()) == 0 { 		return "", nil 	} -	// 4) Execute the best-fit PreemptionStrategy.-	if err := ExecuteStrategy(strategy, pl.fh, cs, pod); err != nil {+	// 4) Apply the candidate winner.+	if err := ApplyCandidate(bestCandidate, pl.fh, cs, pod); err != nil {

Actually this function doesn't really "nominate" - which is done in the ErrorFunc. So how about PreNominateCandidate?

Huang-Wei

comment created time in 9 hours

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 2a05ee5da0b8ede3dbba2c56975d6c3d2a692373

fixup: address comments

view details

push time in 9 hours

Pull request review commentkubernetes/kubernetes

Return a FitError when PreFilter fails with unschedulable status

 func (g *genericScheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes i // Filters the nodes to find the ones that fit the pod based on the framework // filter plugins and filter extenders. func (g *genericScheduler) findNodesThatFitPod(ctx context.Context, prof *profile.Profile, state *framework.CycleState, pod *v1.Pod) ([]*v1.Node, framework.NodeToStatusMap, error) {+	filteredNodesStatuses := make(framework.NodeToStatusMap)+ 	// Run "prefilter" plugins. 	s := prof.RunPreFilterPlugins(ctx, state, pod) 	if !s.IsSuccess() {-		return nil, nil, s.AsError()+		if !s.IsUnschedulable() {

so I think we should keep it this way and optimize later the fact that all nodes will have the same status.

That for sure has an improvement room, like simply using a * to represent all nodes.

I don't think we need to limit them.

+1. I believe it's possible that some PreFilter plugin may return Unschedulable as well.

ahg-g

comment created time in 11 hours

pull request commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

Thanks @adtac !

/lgtm ping @sftim for editorial review.

adtac

comment created time in 11 hours

pull request commentkubernetes/kubernetes

Remove pvcLister from genericScheduler

Exactly, VolumeBinding is a perfect fit.

However, one thing worth noting is that if the pvc's presence check gets moved, g.snpashot() will be called unconditionally - this would result in extra overhead for the cases that a Pod's PVC is not present. @ahg-g I think we should hold this for now. And then in 1.20, craft a benchmark test to evaluate the impact. Or, maybe by then, we have a refined flow to avoid the snapshotting overhead.

Huang-Wei

comment created time in a day

issue commentkubernetes/kubernetes

Scheduler framework: Perfilter did not return a FitError

I'd say we adopted this requirement in #92797 :)

cwdsuzhou

comment created time in a day

Pull request review commentkubernetes/kubernetes

Return a FitError when PreFilter fails with unschedulable status

 func (g *genericScheduler) numFeasibleNodesToFind(numAllNodes int32) (numNodes i // Filters the nodes to find the ones that fit the pod based on the framework // filter plugins and filter extenders. func (g *genericScheduler) findNodesThatFitPod(ctx context.Context, prof *profile.Profile, state *framework.CycleState, pod *v1.Pod) ([]*v1.Node, framework.NodeToStatusMap, error) {+	filteredNodesStatuses := make(framework.NodeToStatusMap)+ 	// Run "prefilter" plugins. 	s := prof.RunPreFilterPlugins(ctx, state, pod) 	if !s.IsSuccess() {-		return nil, nil, s.AsError()+		if !s.IsUnschedulable() {

I rethink it a bit.

The primary benefit of returning a FitError (instead of Error) is to continue preemption. Given that current preemption logic doesn't proceed upon UnschedulableAndUnresolvable status:

https://github.com/kubernetes/kubernetes/blob/21953d15ea48972f20a8de29d58bd5ce6d913914/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go#L224-L228

(but we can argue that custom preemption plugin may proceed even with UnschedulableAndUnresolvable status)

So maybe we can optimize the logic here:

if s.Code() == UnschedulableAndUnresolvable {
ahg-g

comment created time in a day

issue commentkubernetes-sigs/scheduler-plugins

Define release and golang vendor strategy

@xujyan I'm still not a fan of managing patch version that way.

Per https://semver.org/#spec-item-7 and https://semver.org/#spec-item-8:

Patch version MUST be reset to 0 when minor version is incremented. Patch and minor version MUST be reset to 0 when major version is incremented.

We should follow the semver semantics, which is also the convention of Kubernetes releases.

Huang-Wei

comment created time in a day

pull request commentkubernetes/kubernetes

scheduler: Extend ExtenderFilterResult to include UnschedulableAndUnresolvable nodes

@cofyc As this PR also needs API review, and unfortunately tomorrow is the code freeze for 1.19. Per the original plan (targeting 1.20) in KEP, would you mind holding the review until 1.20?

cofyc

comment created time in a day

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

@everpeace @ahg-g Thanks for the review. PTAL.

(this PR should still be /hold until #92876 gets merged.

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

+/*+Copyright 2020 The Kubernetes Authors.++Licensed under the Apache License, Version 2.0 (the "License");+you may not use this file except in compliance with the License.+You may obtain a copy of the License at++    http://www.apache.org/licenses/LICENSE-2.0++Unless required by applicable law or agreed to in writing, software+distributed under the License is distributed on an "AS IS" BASIS,+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+See the License for the specific language governing permissions and+limitations under the License.+*/++package defaultpreemption++import (+	extenderv1 "k8s.io/kube-scheduler/extender/v1"+)++// Strategy defines a number of operations to execute a preemption strategy.+// It's executed by preempting the victims, set the nominatedName for the preemptor,+// as well as other operations to maintain the nominated Pods properly.+type Strategy interface {

Candidate sounds more descriptive. Updated.

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func selectNodesForPreemption( 				Pods:             pods, 				NumPDBViolations: int64(numPDBViolations), 			}-			nodeNameToVictims[potentialNodes[i].Node().Name] = &victims+			s := strategy{+				victims:           &victims,+				nominatedNodeName: nodeInfoCopy.Node().Name,+			}+			strategies = append(strategies, &s) 			resultLock.Unlock() 		} 	} 	parallelize.Until(ctx, len(potentialNodes), checkNode)-	return nodeNameToVictims, nil+	return strategies } -// processPreemptionWithExtenders processes preemption with extenders-func processPreemptionWithExtenders(fh framework.FrameworkHandle, pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims) (map[string]*extenderv1.Victims, error) {-	if len(nodeNameToVictims) > 0 {-		for _, extender := range fh.PreemptHandle().Extenders() {-			if extender.SupportsPreemption() && extender.IsInterested(pod) {-				newNodeNameToVictims, err := extender.ProcessPreemption(-					pod,-					nodeNameToVictims,-					fh.SnapshotSharedLister().NodeInfos(),-				)-				if err != nil {-					if extender.IsIgnorable() {-						klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set",-							extender, err)-						continue-					}-					return nil, err-				}--				// Replace nodeNameToVictims with new result after preemption. So the-				// rest of extenders can continue use it as parameter.-				nodeNameToVictims = newNodeNameToVictims+// CallExtenders call given <extenders> to filter out <strategies>, and return a filtered strategies.+// We will only check <strategies> with extenders that support preemption.+// Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated+// node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles.+func CallExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister,+	strategies []Strategy) ([]Strategy, error) {+	if len(extenders) == 0 {+		return strategies, nil+	} -				// If node list becomes empty, no preemption can happen regardless of other extenders.-				if len(nodeNameToVictims) == 0 {-					break-				}+	// Migrate strategy slice to victimsMap to adapt to the Extender interface.+	// It's only applicable for strategy slice that have unique nominated node name.+	victimsMap := strategiesToVictimsMap(strategies)+	if len(victimsMap) == 0 {+		return strategies, nil+	}+	for _, extender := range extenders {+		if !extender.SupportsPreemption() || !extender.IsInterested(pod) {+			continue+		}+		nodeNameToVictims, err := extender.ProcessPreemption(pod, victimsMap, nodeLister)+		if err != nil {+			if extender.IsIgnorable() {+				klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set",+					extender, err)+				continue 			}+			return nil, err+		}+		// Replace victimsMap with new result after preemption. So the+		// rest of extenders can continue use it as parameter.+		victimsMap = nodeNameToVictims++		// If node list becomes empty, no preemption can happen regardless of other extenders.+		if len(victimsMap) == 0 {+			break 		} 	} -	return nodeNameToVictims, nil+	var newStrategies []Strategy+	for nodeName := range victimsMap {+		newStrategies = append(newStrategies, &strategy{+			victims:           victimsMap[nodeName],+			nominatedNodeName: nodeName,+		})+	}+	return newStrategies, nil+}++// This function is not applicable for out-of-tree preemption plugins that exercise+// different strategies on the same nominated node.+func strategiesToVictimsMap(strategies []Strategy) map[string]*extenderv1.Victims {+	m := make(map[string]*extenderv1.Victims)+	for _, strategy := range strategies {+		m[strategy.NominatedNodeName()] = strategy.Victims()+	}+	return m+}++// PickStrategy chooses the best strategy from given <strategies> and return it.+func PickStrategy(strategies []Strategy) Strategy {+	if len(strategies) == 0 {+		return nil+	}+	if len(strategies) == 1 {+		return strategies[0]+	}++	victimsMap := strategiesToVictimsMap(strategies)+	candidateNode := pickOneNodeForPreemption(victimsMap)++	// Same as strategiesToVictimsMap, this logic is not applicable for out-of-tree+	// preemption plugins that exercise different strategies on the same nominated node.+	for _, strategy := range strategies {+		if candidateNode == strategy.NominatedNodeName() {+			return strategy+		}+	}+	return strategies[0]

Correct. Updated.

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func selectNodesForPreemption( 				Pods:             pods, 				NumPDBViolations: int64(numPDBViolations), 			}-			nodeNameToVictims[potentialNodes[i].Node().Name] = &victims+			s := strategy{+				victims:           &victims,+				nominatedNodeName: nodeInfoCopy.Node().Name,+			}+			strategies = append(strategies, &s) 			resultLock.Unlock() 		} 	} 	parallelize.Until(ctx, len(potentialNodes), checkNode)-	return nodeNameToVictims, nil+	return strategies } -// processPreemptionWithExtenders processes preemption with extenders-func processPreemptionWithExtenders(fh framework.FrameworkHandle, pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims) (map[string]*extenderv1.Victims, error) {-	if len(nodeNameToVictims) > 0 {-		for _, extender := range fh.PreemptHandle().Extenders() {-			if extender.SupportsPreemption() && extender.IsInterested(pod) {-				newNodeNameToVictims, err := extender.ProcessPreemption(-					pod,-					nodeNameToVictims,-					fh.SnapshotSharedLister().NodeInfos(),-				)-				if err != nil {-					if extender.IsIgnorable() {-						klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set",-							extender, err)-						continue-					}-					return nil, err-				}--				// Replace nodeNameToVictims with new result after preemption. So the-				// rest of extenders can continue use it as parameter.-				nodeNameToVictims = newNodeNameToVictims+// CallExtenders call given <extenders> to filter out <strategies>, and return a filtered strategies.+// We will only check <strategies> with extenders that support preemption.+// Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated+// node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles.+func CallExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister,+	strategies []Strategy) ([]Strategy, error) {+	if len(extenders) == 0 {+		return strategies, nil+	} -				// If node list becomes empty, no preemption can happen regardless of other extenders.-				if len(nodeNameToVictims) == 0 {-					break-				}+	// Migrate strategy slice to victimsMap to adapt to the Extender interface.+	// It's only applicable for strategy slice that have unique nominated node name.+	victimsMap := strategiesToVictimsMap(strategies)+	if len(victimsMap) == 0 {+		return strategies, nil+	}+	for _, extender := range extenders {+		if !extender.SupportsPreemption() || !extender.IsInterested(pod) {+			continue+		}+		nodeNameToVictims, err := extender.ProcessPreemption(pod, victimsMap, nodeLister)+		if err != nil {+			if extender.IsIgnorable() {+				klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set",+					extender, err)+				continue 			}+			return nil, err 		}+		// Replace victimsMap with new result after preemption. So the+		// rest of extenders can continue use it as parameter.+		victimsMap = nodeNameToVictims++		// If node list becomes empty, no preemption can happen regardless of other extenders.+		if len(victimsMap) == 0 {+			break+		}+	}++	var newStrategies []Strategy+	for nodeName := range victimsMap {+		newStrategies = append(newStrategies, &strategy{+			victims:           victimsMap[nodeName],+			nominatedNodeName: nodeName,+		})+	}+	return newStrategies, nil+}++// This function is not applicable for out-of-tree preemption plugins that exercise+// different strategies on the same nominated node.+func strategiesToVictimsMap(strategies []Strategy) map[string]*extenderv1.Victims {

Ah, I don't want this to be exposed to confuse users as it's specifically needed for defaultpreemption to adapt to the Extender interface.

Huang-Wei

comment created time in a day

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 4d5671849cec3aae4f2d500f8e070c1803634c40

fixup: rename Strategy to Candidate

view details

push time in a day

Pull request review commentkubernetes/kubernetes

Refactor and expose common preemption functions

 func selectNodesForPreemption( 				Pods:             pods, 				NumPDBViolations: int64(numPDBViolations), 			}-			nodeNameToVictims[potentialNodes[i].Node().Name] = &victims+			s := strategy{+				victims:           &victims,+				nominatedNodeName: nodeInfoCopy.Node().Name,+			}+			strategies = append(strategies, &s) 			resultLock.Unlock() 		} 	} 	parallelize.Until(ctx, len(potentialNodes), checkNode)-	return nodeNameToVictims, nil+	return strategies } -// processPreemptionWithExtenders processes preemption with extenders-func processPreemptionWithExtenders(fh framework.FrameworkHandle, pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims) (map[string]*extenderv1.Victims, error) {-	if len(nodeNameToVictims) > 0 {-		for _, extender := range fh.PreemptHandle().Extenders() {-			if extender.SupportsPreemption() && extender.IsInterested(pod) {-				newNodeNameToVictims, err := extender.ProcessPreemption(-					pod,-					nodeNameToVictims,-					fh.SnapshotSharedLister().NodeInfos(),-				)-				if err != nil {-					if extender.IsIgnorable() {-						klog.Warningf("Skipping extender %v as it returned error %v and has ignorable flag set",-							extender, err)-						continue-					}-					return nil, err-				}--				// Replace nodeNameToVictims with new result after preemption. So the-				// rest of extenders can continue use it as parameter.-				nodeNameToVictims = newNodeNameToVictims+// CallExtenders call given <extenders> to filter out <strategies>, and return a filtered strategies.+// We will only check <strategies> with extenders that support preemption.+// Extenders which do not support preemption may later prevent preemptor from being scheduled on the nominated+// node. In that case, scheduler will find a different host for the preemptor in subsequent scheduling cycles.+func CallExtenders(extenders []framework.Extender, pod *v1.Pod, nodeLister framework.NodeInfoLister,

SG.

Huang-Wei

comment created time in a day

issue commentkubernetes/kubernetes

[Umbrella] scheduler PostFilter extension point

In addition to @damemi 's comments, the SIG-Scheduling is sponsoring a sub-project called https://github.com/kubernetes-sigs/scheduler-plugins. Its primary goal is to gather 3rd party plugins and evolve in an open-source manner.

As I understand, the PostFilter extension point is almost ready to be provided in the v1.19 release.

Yes, all work items have been completed. Once the official v1.19 release is cut, you can have the defaultpreemption plugin in place, as well as implementing your own preemption logic, such as cross-node-preemption.

I'd like to try to develop a PostFilter plugin using the current code, do you encourage me on that?

Sure, some companies are already proposing new plugins at https://github.com/kubernetes-sigs/scheduler-plugins. Feel free to raise an issue discussing what you like to do first, and design/implementation afterwards.

Is there any specific release/commit that would be more appropriate to start developing on?

1.18 is a good start. And with 1.19, you will be able to implement PostFilter plugins (custom preemption for instance)

I'm not senior on go/Kubernetes, so could you point me some documentation (if it exists) that could help me to deploy the kube-scheduler configured with these new plugins?

We have some documents here: https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/. But it may be a bit high-level. We're a bit overloaded to craft detailed step-by-step guides atm, but that's under our radar, and also any contribution is very welcome!

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/website

Docs for new default PodTopologySpread functionality and gate

 profiles:       args:         defaultConstraints:           - maxSkew: 1-            topologyKey: failure-domain.beta.kubernetes.io/zone+            topologyKey: topology.kubernetes.io/zone             whenUnsatisfiable: ScheduleAnyway ```  {{< note >}} The score produced by default scheduling constraints might conflict with the score produced by the-[`DefaultPodTopologySpread` plugin](/docs/reference/scheduling/config/#scheduling-plugins).+[`SelectorSpread` plugin](/docs/reference/scheduling/config/#scheduling-plugins). It is recommended that you disable this plugin in the scheduling profile when using default constraints for `PodTopologySpread`. {{< /note >}} +#### Internal default constraints++{{< feature-state for_k8s_version="v1.19" state="alpha" >}}++When the feature gate `DefaultPodTopologySpreadPlugin` is enabled,

didn't catch that...

alculquicondor

comment created time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 Plugins wishing to perform "pre-reserve" work should use the NormalizeScore extension point. {{< /note >}} -### Reserve--This is an informational extension point. Plugins which maintain runtime state-(aka "stateful plugins") should use this extension point to be notified by the-scheduler when resources on a node are being reserved for a given Pod. This-happens before the scheduler actually binds the Pod to the Node, and it exists-to prevent race conditions while the scheduler waits for the bind to succeed.--This is the last step in a scheduling cycle. Once a Pod is in the reserved-state, it will either trigger [Unreserve](#unreserve) plugins (on failure) or-[PostBind](#post-bind) plugins (on success) at the end of the binding cycle.+### Reserve {#reserve}++A Reserve plugin implements two methods, namely Reserve and Unreserve, to serve+as informational extension points. Plugins which maintain runtime state (aka

LGTM, slightly reworded:

The Reserve extension point backs two informational scheduling phases: Reserve and Unreserve,
which are implemented in pairs and get called during these phases, respectively.
adtac

comment created time in a day

pull request commentkubernetes/website

Docs for new default PodTopologySpread functionality and gate

/lgtm /approve

alculquicondor

comment created time in a day

delete branch Huang-Wei/kubernetes

delete branch : rm-DisablePreemption

delete time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 to clean up associated resources.  ### Unreserve

UnReserve is a scheduling phase, but not an extension point.

I prefer to read it this way, and it's a dynamic phase, that's why categorized it with a fixed phase "Reserve" in pairs.

adtac

comment created time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 to clean up associated resources.  ### Unreserve

I'd read the term "extension point" as an API defined in https://github.com/kubernetes/kubernetes/blob/bc60bdaded587ef638c165c49680728a57326f29/staging/src/k8s.io/kube-scheduler/config/v1beta1/types.go#L159, and also it should be 1:1 mapped to the rectangles in the architecture picture. Specifically, a plugin can implement multiple extension points, and an extension point represents a phase in a Pod's scheduling workflow.

Most "extension points" just have one method defined, such as Fitler/Score. We do also have other ones such as PreFilter which has method "PreFilter" as well as "AddPod"/"RemovePod", implicitly though.

adtac

comment created time in a day

pull request commentkubernetes/website

Document the changes of scheduler PostFilter extension point

/cc @sftim @alculquicondor @savitharaghunathan

Huang-Wei

comment created time in a day

PR opened kubernetes/website

Document the changes of scheduler PostFilter extension point

<!-- 🛈

Hello!

Remember to ADD A DESCRIPTION and delete this note before submitting your pull request. The description should explain what will change, and why.

PLEASE title the FIRST commit appropriately, so that if you squash all your commits into one, the combined commit message makes sense. For overall help on editing and submitting pull requests, visit: https://kubernetes.io/docs/contribute/start/#improve-existing-content

Use the default base branch, “master”, if you're documenting existing features in the English localization.

If you're working on a different localization (not English), or you are documenting a feature that will be part of a future release, see https://kubernetes.io/docs/contribute/new-content/overview/#choose-which-git-branch-to-use for advice.

-->

This PR documents the changes of the new scheduler PostFilter extension point.

/sig scheduling

+24 -16

0 comment

4 changed files

pr created time in a day

create barnchHuang-Wei/website

branch : postfilter-doc

created branch time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 the three things:  1.  **deny** \     If any Permit plugin denies a Pod, it is returned to the scheduling queue.-    This will trigger [Unreserve](#unreserve) plugins.+    This will trigger the [Unreserve](#unreserve) extension point.

API can be replaced with other terms like "method" or "function".

adtac

comment created time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 the three things:  1.  **deny** \     If any Permit plugin denies a Pod, it is returned to the scheduling queue.-    This will trigger [Unreserve](#unreserve) plugins.+    This will trigger the [Unreserve](#unreserve) extension point.

Once the Unreserve stanza is moved, we can rephrase here:

This will trigger the "unreserve" API in the [Reserve](#reserve) extension point.
adtac

comment created time in a day

Pull request review commentkubernetes/website

scheduling-framework.md: update Reserve and Unreserve descriptions

 to clean up associated resources.  ### Unreserve

Technically, Unreserve is not an extension point anymore. I'd suggest moving (and may need some rephrasing) this section as a bullet point of Reserve. So there can be two bullet points in Reserve, explaining the implementation/execution of Reserve and Reserve accordingly, under different circumstances.

adtac

comment created time in a day

push eventHuang-Wei/website

Mateti, Vijay

commit sha effc56fa9f18d695a7ad477f0eb5ae0172b3ef23

updated broken container environment glossary

view details

Mateti, Vijay

commit sha a82535615f1eaddb1c90b338b9f6177f28722c62

updated broken glossary link for container environment concept on secret concept

view details

Kubernetes Prow Robot

commit sha 58aeb4cb019dc3e3c6c969698d890bc1c0df9312

Merge pull request #21472 from yu-kasuya/fix21402 Update content/ja/docs/tasks/tools/install-minikube.md

view details

Kubernetes Prow Robot

commit sha 53f85038cf7f89d5f641dd481e69ed2c8fc2a816

Merge pull request #21485 from hiyokotaisa/fix-21481 ja: Make docs/concepts/storage/persistent-volumes.md follow v1.17 of the original text

view details

Ryoko Tominaga

commit sha e8fd2ebad471bc8fd31376e099de4860eb3d86da

fix wording

view details

Ryoko Tominaga

commit sha bee08c56f2cac9b785f5a2b8c1522ef8d74eb17c

fix URLs

view details

Kubernetes Prow Robot

commit sha 24e553584afa95cc3090fd22f898207e764275e5

Merge pull request #21510 from nishipy/dev-1.17-ja.2 ja: Make /docs/tasks/access-application-cluster/configure-access-multiple-clusters/ follow v1.17 of the original text

view details

Kento Yagisawa

commit sha d1352337a5aa591d243421164a580990a389462b

Update field-selectors.md for v1.17

view details

Kubernetes Prow Robot

commit sha 46e674e2b95d1cec075cfcc7ce93763e50df9e83

Merge pull request #21504 from ryokotmng/ja/working-with-objects ja: Make docs/concepts/overview/working-with-objects/labels.md follow v1.17 of the original text

view details

Raoni Timo de Castro Cambiaghi

commit sha 5ed0d961060ec4a7ece1fe65ed0099f0bef06aa1

Fixing broken link to Certificate Management with kubeadm A missing '/' on the link will lead to a 404 error. Fixing it.

view details

Kubernetes Prow Robot

commit sha 89754def60a184d45811763c95b44957092c5240

Merge pull request #21521 from hiyokotaisa/fix-21517 ja: Make docs/concepts/overview/working-with-objects/field-selectors.md follow v1.17 of the original text

view details

YukiKasuya

commit sha d4028abb9c2c953a045cfff0557d0e803cd3c8fb

add hello-application.yaml file under ja directory

view details

Kento Yagisawa

commit sha b9b688828361e57219b8d66ff6801bb0abda10ee

Update dns-pod-service.md for v1.17

view details

Kento Yagisawa

commit sha 698f77cfbce1a511528cfef966298f0ec333623f

Update _index.md for v1.17

view details

Kubernetes Prow Robot

commit sha 0909848f1e14b0d0320b4b779bf84a2122d6e073

Merge pull request #21492 from tallclair/pod-security-profiles Minor cleanup of standardized pod security

view details

Aditya Alif Nugraha

commit sha f73d078405cdc4b1a9a83cc402a3757152f58923

Apply suggestions from code review Co-authored-by: Giri Kuncoro <girikuncoro@users.noreply.github.com>

view details

Kento Yagisawa

commit sha 443ba046faa3e358b1a5f619b992de3b6fd96450

modify the incorrect update

view details

Kubernetes Prow Robot

commit sha 881c1472b1c6ae3d3e02d3a21525a93ff67a2640

Merge pull request #21525 from hiyokotaisa/fix-21500 ja: Make docs/concepts/services-networking/dns-pod-service.md follow v1.17 of the original text

view details

hikkie3110

commit sha 2ba23bdb9ed04d3fe96eec4645cc5d11a177c9df

Update statefulset.md for v1.17

view details

Kubernetes Prow Robot

commit sha 68e705da9d4cdb81f7e3e4a879c2caecdbbb707a

Merge pull request #21524 from yu-kasuya/fix21523 Add hello-application.yaml file under ja directory

view details

push time in a day

pull request commentkubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

Thanks @alculquicondor @liggitt for the review!

Since v1beta1 scheduler config is new this release, the release note doesn't need to say something was removed from v1beta1, this should be added to the docs detailing the differences between v1alpha2 and v1beta1

Release note removed.

@alculquicondor would you mind adding a bullet to your PR https://github.com/kubernetes/website/pull/21437, in docs/reference/scheduling/config.md#beta-changes?

- `.disablePreemption` was removed. Users can disable preemption by disabling the "defaultpreemption" PostFilter plugin.
Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

 func (sched *Scheduler) scheduleOne(ctx context.Context) { 		// into the resources that were preempted, but this is harmless. 		nominatedNode := "" 		if fitError, ok := err.(*core.FitError); ok {-			if sched.DisablePreemption || !prof.HasPostFilterPlugins() {-				klog.V(3).Infof("Pod priority feature is not enabled or preemption is disabled by scheduler configuration." +-					" No preemption is performed.")+			if !prof.HasPostFilterPlugins() {+				klog.V(3).Infof("No PostFilter plugins are registered, so no preemption will be performed.")

this makes it seem like you have to enable postfilter plugins for preemption to work.

True, it's enabled by default. The background is that scheduler have almost "pluginize" all hard-coded logic into plugins. In 1.19 the defaultpreemption plugin follows that direction.

So for a default scheduler configuration, preemption functions the same as before. But users can still disable preemption by tweaking the config, just like what they did by specifying DisablePreemption: false.

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Preemption plugin to fetch pod from informer cache

 func (pl *DefaultPreemption) PostFilter(ctx context.Context, state *framework.Cy // using the nominated resources and the nominated pod could take a long time // before it is retried after many other pending pods. func preempt(ctx context.Context, fh framework.FrameworkHandle, state *framework.CycleState, pod *v1.Pod, m framework.NodeToStatusMap) (string, error) {-	cs := fh.ClientSet()-	// TODO(Huang-Wei): get pod from informer cache instead of API server.-	pod, err := util.GetUpdatedPod(cs, pod)+	// It's safe to directly fetch pod here. Because the informer cache has already been+	// initialized when creating the Scheduler obj, i.e., factory.go#MakeDefaultErrorFunc().+	// However, tests may need to manually initialize the shared pod informer.+	pod, err := fh.SharedInformerFactory().Core().V1().Pods().Lister().Pods(pod.Namespace).Get(pod.Name)

Should the method 'SharedInformerFactory()' should be removed from 'framework.FrameworkHandle'?

Big no... It's the canonical way to interface with API resources.

Feel like the people who want to write their own plugin are easily making same mistake.

We should document it in our development doc. Ideally in https://github.com/kubernetes-sigs/scheduler-plugins/

Huang-Wei

comment created time in a day

Pull request review commentkubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

 func (sched *Scheduler) scheduleOne(ctx context.Context) { 		// into the resources that were preempted, but this is harmless. 		nominatedNode := "" 		if fitError, ok := err.(*core.FitError); ok {-			if sched.DisablePreemption || !prof.HasPostFilterPlugins() {+			if !prof.HasPostFilterPlugins() { 				klog.V(3).Infof("Pod priority feature is not enabled or preemption is disabled by scheduler configuration." +

Good catch. Updated.

Huang-Wei

comment created time in a day

push eventHuang-Wei/kubernetes

lsytj0413

commit sha 64094899b03ce093edfbc93131a66a9aef22a046

test(e2e_node): Parallelize prepulling all images in `e2e_node` tests

view details

Aurélien Baumann

commit sha 484361a1d1eb1e7d37569d0bbe7f3a6ca0de986b

Remove the dependency between create clusterrolebinding command and generators

view details

Sandeep Rajan

commit sha 4dc635d54268de0c4c97d4db7eb8db01d226e2fb

remove kube-dns translation for federation

view details

Kubernetes Prow Robot

commit sha bf94f27e76c541db57098ed69aea47d889703669

Merge pull request #92716 from rajansandeep/removefederation [kubeadm]: Remove kube-dns translation for federation

view details

Kubernetes Prow Robot

commit sha 9eced040142454a20255ae323279a38dc6b2bc1a

Merge pull request #91007 from lsytj0413/fix-89443 test(e2e_node): Parallelize prepulling all images in `e2e_node` tests

view details

Kubernetes Prow Robot

commit sha bc60bdaded587ef638c165c49680728a57326f29

Merge pull request #91127 from aubm/refactor-command-kubectl-create-clusterrolebinding Remove the dependency between create clusterrolebinding command and generators

view details

Wei Huang

commit sha 4b26ef22177eb54122e1345dfe2ee7030760725f

Remove DisablePreemption field from SchedulerConfig v1beta1 DisablePreemption field can be removed as it can be deduced from PostFilterPlugins.

view details

Wei Huang

commit sha d65a97848e83e21bde6a76feefd385afaea9c1d7

codegen

view details

push time in a day

Pull request review commentkubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

 func initTest(t *testing.T, nsPrefix string, opts ...scheduler.Option) *testutil // initTestDisablePreemption initializes a test environment and creates master and scheduler with default // configuration but with pod preemption disabled. func initTestDisablePreemption(t *testing.T, nsPrefix string) *testutils.TestContext {+	prof := schedulerconfig.KubeSchedulerProfile{+		SchedulerName: v1.DefaultSchedulerName,+		Plugins: &schedulerconfig.Plugins{+			PostFilter: &schedulerconfig.PluginSet{+				Disabled: []schedulerconfig.Plugin{+					{Name: "*"},

Done.

Huang-Wei

comment created time in a day

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/retest

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/retest

Huang-Wei

comment created time in 2 days

delete branch Huang-Wei/website

delete branch : deprecate-ResourceLimitsPriorityFunction

delete time in 2 days

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 1e438866c98de76368595e4870f550f12f75fcc7

codegen

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/retest

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

/assign @alculquicondor /priority important-soon

Huang-Wei

comment created time in 2 days

PR opened kubernetes/kubernetes

Remove DisablePreemption field from KubeSchedulerConfiguration

What type of PR is this?

/kind cleanup /sig scheduling

What this PR does / why we need it:

With the refactoring of PostFilter extension point, DisablePreemption field in KubeSchedulerConfiguration is no longer needed as that can be deduced from profile's postFilterPlugins.

Which issue(s) this PR fixes:

/ref #91038 #89701.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

DisablePreemption field is now removed from SchedulerConfig v1beta1. A recommended way is to disable PostFilter plugins in the configuration.

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

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/785-scheduler-component-config-api
+14 -46

0 comment

11 changed files

pr created time in 2 days

create barnchHuang-Wei/kubernetes

branch : rm-DisablePreemption

created branch time in 2 days

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/priority important-soon

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Refactor and expose common preemption functions

/hold this PR is built on top of #92876.

/assign @ahg-g /cc @everpeace @denkensk

Huang-Wei

comment created time in 2 days

PR opened kubernetes/kubernetes

Refactor and expose common preemption functions

What type of PR is this?

/kind cleanup /sig scheduling

What this PR does / why we need it:

This PR divides the whole preemption flow into 4 public functions:

  • CalcStrategies: Calculate the preemption strategies. Out-of-tree plugins may rewrite this in their implementation.
  • CallExtenders: Interact with extenders. Usually, out-of-tree plugins just call it as-is.
  • PickStrategy: Pick the best-fit preemption strategy from strategy candidates. Out-of-tree plugins may rewrite this in their implementation.
  • ExecuteStrategy: Execute the bets-fit preemption strategy. Usually, out-of-tree plugins just call it as-is.

Other notable changes:

  • selectNodesForPreemption is renamed to dryRunPreemption
  • a Strategy interface is introduced. Out-of-tree plugins can have their own implementation.
  • map nodeNameToVictims is refactored to []Strategy as we used to assume the nominated node name is unique, but with the same nnn, there could be more than one strategy, so using a slice instead of map to represent all strategies makes more sense.

Which issue(s) this PR fixes:

Part of #91038.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
+364 -187

0 comment

4 changed files

pr created time in 2 days

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 5c435f670f6a8ab3fecbb0822d4488e255414b4b

Refactor and expose common preemption functions

view details

push time in 2 days

create barnchHuang-Wei/kubernetes

branch : postfilter-impl-6

created branch time in 2 days

push eventHuang-Wei/kubernetes

Ted Yu

commit sha 3f043dd8a06a553de91e1bfb84500d66daf97e18

Sort init container statuses using non-nested loop

view details

haleygo

commit sha d6cf8d3e574b0e28fcf4b3f2ab7c8fb69b6f936f

update static check failed from pkg/volume/rbd remove field from staticcheck_failures

view details

Sri Saran Balaji Vellore Rajakumar

commit sha 05240c9218e84a3bfeb2ced62824b33b0b23efe5

Add support for disabling /logs endpoint in kubelet

view details

Yuvaraj Kakaraparthi

commit sha f93ad0204eeeb21e567df3d5841847373bf7a646

kubectl: cannot use --force with --server-side

view details

Kubernetes Prow Robot

commit sha 3615291cb3ef45323c563f5a72006a5d7aeff0cf

Merge pull request #92834 from ykakarap/kubectl_force_flag_serverside kubectl: cannot use --force with --server-side

view details

Kubernetes Prow Robot

commit sha aaf40adcd006945a7ed63415448d7ee0e6c21f33

Merge pull request #92461 from Haleygo/001 update static check failed from pkg/volume/rbd

view details

Kubernetes Prow Robot

commit sha 7e75a5ef43b3e1db761e8152ac654cfa67dd62bd

Merge pull request #87273 from SaranBalaji90/kubelet-log-file Add support for disabling /logs endpoint in kubelet

view details

Kubernetes Prow Robot

commit sha 5afc42de9501ac7b06bbb349e03a666efd5e3bd7

Merge pull request #78373 from tedyu/sort-init-container Sort init container statuses using non-nested loop

view details

Jordan Liggitt

commit sha dcc536097a2f1029f6d18adca698ff4ba98a93ec

Deflake timeout admission test

view details

Kubernetes Prow Robot

commit sha 7de3f938c82a7c0538bdfac5bb9b3cad50c30eae

Merge pull request #92873 from liggitt/admission-flake Deflake timeout admission test

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

/retest

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

/retest

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

/retest

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

@ahg-g needs another /lgtm. Some dead code gets cleaned up:

diff --git a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go
index 12c9f69504e..bc1044ea137 100644
--- a/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go
+++ b/pkg/scheduler/framework/plugins/defaultpreemption/default_preemption.go
@@ -67,10 +67,6 @@ func New(_ runtime.Object, fh framework.FrameworkHandle) (framework.Plugin, erro
 		fh:        fh,
 		pdbLister: getPDBLister(fh.SharedInformerFactory()),
 	}
-	if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.PodDisruptionBudget) {
-		// A hack to initialize pdbLister in sharedInformerFactory.
-		fh.SharedInformerFactory().Policy().V1beta1().PodDisruptionBudgets().Lister()
-	}
 	return &pl, nil
 }
Huang-Wei

comment created time in 2 days

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 9d377eb6559cc3a9e8fd113a3d33db52147815fb

Add pdbLister as a member field of struct DefaultPreemption

view details

push time in 2 days

pull request commentkubernetes/kubernetes

Cut off the cost to run filter plugins when no victim pods are found

/priority important-soon

chendave

comment created time in 2 days

pull request commentkubernetes/kubernetes

Avoid executing preemption for pods with 0 priority

/lgtm

ahg-g

comment created time in 2 days

pull request commentkubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

/assign @ahg-g

Huang-Wei

comment created time in 2 days

PR opened kubernetes/kubernetes

Add pdbLister as a member field of struct DefaultPreemption

What type of PR is this?

/kind cleanup /sig scheduling

What this PR does / why we need it:

Per https://github.com/kubernetes/kubernetes/issues/92781#issuecomment-653651001, it's a good practice to keep a xyzLister inside the plugin struct, and initialize that xyzLister in the initialization function. In this way, we use xyzLister (instead of informerFactory....lister()) in the plugin logic as that's guaranteed to have been initialized.

Which issue(s) this PR fixes:

Part of #92781

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
+42 -19

0 comment

3 changed files

pr created time in 2 days

create barnchHuang-Wei/kubernetes

branch : pdbLister

created branch time in 2 days

pull request commentkubernetes/kubernetes

Preemption plugin to fetch pod from informer cache

lets do the pdblister cleanup while waiting for the changes to the pod informer options, the freeze deadline is in a couple of days.

Sure. I will move the related changes out into a new PR.

Huang-Wei

comment created time in 2 days

pull request commentkubernetes/kubernetes

selectorspread: access listers in plugin instantiation

/retest

adtac

comment created time in 2 days

push eventHuang-Wei/kubernetes

Wei Huang

commit sha 426ce773a3826c59270fd6da672501b203c4a19e

TEMP

view details

push time in 3 days

create barnchHuang-Wei/kubernetes

branch : plugin-claim-events

created branch time in 3 days

pull request commentkubernetes/kubernetes

Remove pvcLister from genericScheduler

We should keep the convention of accessing Lister() only before the informer factory started. I think we should keep the current code of taking a reference of the lister when creating the generic scheduler instance.

That makes sense.

Given that podPassesBasicChecks() (which uses g.pvcLister) is just checking pod's PVC, IMO it's not a must to run at the beginning of Schedule(). Instead, I'd prefer to move it to a new plugin (or merge into an existing general plugin) and it should implement the PreFilter() extension point, then we can keep a pvcLister member field there to ensure it's initialized. WDYT?

Huang-Wei

comment created time in 3 days

issue commentkubernetes/kubernetes

[Failing test] kubeadm-kinder-master (ci-kubernetes-e2e-kubeadm-kinder-master)

@neolit123 b3741f3 seems irrelevant as that commit is effective only when a pod has preempted other pods and is being retried.

sayanchowdhury

comment created time in 3 days

pull request commentkubernetes/kubernetes

Remove pvcLister from genericScheduler

/retest /assign @ahg-g

Huang-Wei

comment created time in 3 days

pull request commentkubernetes/kubernetes

Cut off the cost to run filter plugins when no victim pods are found

/approve leave /lgtm to @ahg-g .

chendave

comment created time in 3 days

Pull request review commentkubernetes/kubernetes

Cut off the cost to run filter plugins when no victim pods are found

 func pickOneNodeForPreemption(nodesToVictims map[string]*extenderv1.Victims) str 	var minNodes1 []string 	lenNodes1 := 0 	for node, victims := range nodesToVictims {-		if len(victims.Pods) == 0 {-			// We found a node that doesn't need any preemption. Return it!-			// This should happen rarely when one or more pods are terminated between-			// the time that scheduler tries to schedule the pod and the time that-			// preemption logic tries to find nodes for preemption.-			return node-		}

SG. I think this code was introduced long time ago, by then it was not guaranteed we have a consistent cluster view in one scheduling cycle.

chendave

comment created time in 3 days

push eventHuang-Wei/kubernetes

Jeff Grafton

commit sha 089a1af42170237e366a9e8ddb8726a27993b13b

Move ixdy to emeritus

view details

Kubernetes Prow Robot

commit sha 557721412872fc5ff0bc02395f5be9ec6b55ca9a

Merge pull request #92835 from ixdy/ixdy-owners Move ixdy to emeritus

view details

push time in 3 days

PR opened kubernetes/kubernetes

Remove pvcLister from genericScheduler

What type of PR is this?

/kind cleanup /sig scheduling

What this PR does / why we need it:

With recent code refactoring, PVCLister can be fetched from sharedInformerFactory, so don't need to be a field in genericScheduler.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
+23 -24

0 comment

6 changed files

pr created time in 3 days

create barnchHuang-Wei/kubernetes

branch : rm-pvcLister

created branch time in 3 days

Pull request review commentkubernetes/kubernetes

selectorspread: access listers in plugin instantiation

 go_library(         "//staging/src/k8s.io/api/core/v1:go_default_library",         "//staging/src/k8s.io/apimachinery/pkg/labels:go_default_library",         "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",+        "//staging/src/k8s.io/client-go/listers/core/v1:go_default_library",+        "//staging/src/k8s.io/client-go/listers/apps/v1:go_default_library",

I guess you manually updated this file? Bazel would be unhappy on this as "apps" should be alphabetically ahead of "core".

adtac

comment created time in 3 days

Pull request review commentkubernetes/website

Add Scheduling Configuration reference doc

 extension points:    sort pending Pods in the scheduling queue. Exactly one queue sort plugin    may be enabled at a time. 1. `PreFilter`: These plugins are used to pre-process or check information-   about a Pod or the cluster before filtering.+   about a Pod or the cluster before filtering. They can mark a pod as+   unschedulable. 1. `Filter`: These plugins are the equivalent of Predicates in a scheduling    Policy and are used to filter out nodes that can not run the Pod. Filters-   are called in the configured order.+   are called in the configured order. A pod is marked as unschedulable if no+   nodes pass all the filters. 1. `PreScore`: This is an informational extension point that can be used    for doing pre-scoring work. 1. `Score`: These plugins provide a score to each node that has passed the    filtering phase. The scheduler will then select the node with the highest    weighted scores sum. 1. `Reserve`: This is an informational extension point that notifies plugins-   when resources have being reserved for a given Pod.+   when resources have been reserved for a given Pod. Plugins also implement an+   `Unreserve` call that gets called in the case of failure during or after+   `Reserve`. 1. `Permit`: These plugins can prevent or delay the binding of a Pod. 1. `PreBind`: These plugins perform any work required before a Pod is bound. 1. `Bind`: The plugins bind a Pod to a Node. Bind plugins are called in order    and once one has done the binding, the remaining plugins are skipped. At    least one bind plugin is required. 1. `PostBind`: This is an informational extension point that is called after    a Pod has been bound.-1. `UnReserve`: This is an informational extension point that is called if-   a Pod is rejected after being reserved and put on hold by a `Permit` plugin.++For each extension point, you could disable specific [default plugins](#scheduling-plugins)+or enable your own. For example:++```yaml+apiVersion: kubescheduler.config.k8s.io/v1beta1+kind: KubeSchedulerConfiguration+profiles:+  - plugins:+      score:+        disabled:+        - name: NodeResourcesLeastAllocated+        enabled:+        - name: MyCustomPluginA+          weight: 2+        - name: MyCustomPluginB+          weight: 1+```++You can use `*`  as name in the disabled array to disable all default plugins
You can use `*` as name in the disabled array to disable all default plugins
alculquicondor

comment created time in 3 days

more