Skip to content

Commit 904a6db

Browse files
authored
Merge pull request #40214 from bergerhoffer/OSDOCS-3138
OSDOCS-3138: Removing scheduler policy
2 parents 55f7248 + 31fdf52 commit 904a6db

15 files changed

+33
-1327
lines changed

_topic_maps/_topic_map.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,8 +1769,6 @@ Topics:
17691769
Topics:
17701770
- Name: About pod placement using the scheduler
17711771
File: nodes-scheduler-about
1772-
- Name: Configuring the default scheduler to control pod placement
1773-
File: nodes-scheduler-default
17741772
- Name: Scheduling pods using a scheduler profile
17751773
File: nodes-scheduler-profiles
17761774
- Name: Placing pods relative to other pods using pod affinity and anti-affinity rules

modules/nodes-nodes-working-master-schedulable.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ metadata:
4949
uid: a636d30a-d377-11e9-88d4-0a60097bee62
5050
spec:
5151
mastersSchedulable: false <1>
52-
policy:
53-
name: ""
5452
status: {}
5553
----
5654
<1> Set to `true` to allow control plane nodes to be schedulable, or `false` to

modules/nodes-scheduler-default-about.adoc

Lines changed: 10 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -9,110 +9,22 @@
99
The existing generic scheduler is the default platform-provided scheduler
1010
_engine_ that selects a node to host the pod in a three-step operation:
1111

12-
13-
Filters the Nodes::
12+
Filters the nodes::
1413
The available nodes are filtered based on the constraints or requirements
1514
specified. This is done by running each node through the list of filter
16-
functions called _predicates_.
15+
functions called _predicates_, or _filters_.
1716

18-
Prioritize the Filtered List of Nodes::
19-
This is achieved by passing each node through a series of priority_ functions
17+
Prioritizes the filtered list of nodes::
18+
This is achieved by passing each node through a series of _priority_, or _scoring_, functions
2019
that assign it a score between 0 - 10, with 0 indicating a bad fit and 10
2120
indicating a good fit to host the pod. The scheduler configuration can also take
22-
in a simple _weight_ (positive numeric value) for each priority function. The
23-
node score provided by each priority function is multiplied by the weight
24-
(default weight for most priorities is 1) and then combined by adding the scores for each node
25-
provided by all the priorities. This weight attribute can be used by
26-
administrators to give higher importance to some priorities.
21+
in a simple _weight_ (positive numeric value) for each scoring function. The
22+
node score provided by each scoring function is multiplied by the weight
23+
(default weight for most scores is 1) and then combined by adding the scores for each node
24+
provided by all the scores. This weight attribute can be used by
25+
administrators to give higher importance to some scores.
2726

28-
Select the Best Fit Node::
27+
Selects the best fit node::
2928
The nodes are sorted based on their scores and the node with the highest score
3029
is selected to host the pod. If multiple nodes have the same high score, then
3130
one of them is selected at random.
32-
33-
[id="nodes-scheduler-default-about-understanding_{context}"]
34-
== Understanding Scheduler Policy
35-
36-
The selection of the predicate and priorities defines the policy for the scheduler.
37-
38-
The scheduler configuration file is a JSON file, which must be named `policy.cfg`, that specifies the predicates and priorities the scheduler
39-
will consider.
40-
41-
In the absence of the scheduler policy file, the default scheduler behavior is used.
42-
43-
// we are working on how to configures this in 4.0 right now in https://github.com/openshift/api/pull/181
44-
45-
[IMPORTANT]
46-
====
47-
The predicates and priorities defined in
48-
the scheduler configuration file completely override the default scheduler
49-
policy. If any of the default predicates and priorities are required,
50-
you must explicitly specify the functions in the policy configuration.
51-
====
52-
53-
.Sample scheduler config map
54-
[source,yaml]
55-
----
56-
apiVersion: v1
57-
data:
58-
policy.cfg: |
59-
{
60-
"kind" : "Policy",
61-
"apiVersion" : "v1",
62-
"predicates" : [
63-
{"name" : "MaxGCEPDVolumeCount"},
64-
{"name" : "GeneralPredicates"}, <1>
65-
{"name" : "MaxAzureDiskVolumeCount"},
66-
{"name" : "MaxCSIVolumeCountPred"},
67-
{"name" : "CheckVolumeBinding"},
68-
{"name" : "MaxEBSVolumeCount"},
69-
{"name" : "MatchInterPodAffinity"},
70-
{"name" : "CheckNodeUnschedulable"},
71-
{"name" : "NoDiskConflict"},
72-
{"name" : "NoVolumeZoneConflict"},
73-
{"name" : "PodToleratesNodeTaints"}
74-
],
75-
"priorities" : [
76-
{"name" : "LeastRequestedPriority", "weight" : 1},
77-
{"name" : "BalancedResourceAllocation", "weight" : 1},
78-
{"name" : "ServiceSpreadingPriority", "weight" : 1},
79-
{"name" : "NodePreferAvoidPodsPriority", "weight" : 1},
80-
{"name" : "NodeAffinityPriority", "weight" : 1},
81-
{"name" : "TaintTolerationPriority", "weight" : 1},
82-
{"name" : "ImageLocalityPriority", "weight" : 1},
83-
{"name" : "SelectorSpreadPriority", "weight" : 1},
84-
{"name" : "InterPodAffinityPriority", "weight" : 1},
85-
{"name" : "EqualPriority", "weight" : 1}
86-
]
87-
}
88-
kind: ConfigMap
89-
metadata:
90-
creationTimestamp: "2019-09-17T08:42:33Z"
91-
name: scheduler-policy
92-
namespace: openshift-config
93-
resourceVersion: "59500"
94-
selfLink: /api/v1/namespaces/openshift-config/configmaps/scheduler-policy
95-
uid: 17ee8865-d927-11e9-b213-02d1e1709840`
96-
----
97-
<1> The `GeneralPredicates` predicate represents the `PodFitsResources`, `HostName`, `PodFitsHostPorts`, and `MatchNodeSelector` predicates.
98-
Because you are not allowed to configure the same predicate multiple times, the `GeneralPredicates` predicate cannot be used alongside
99-
any of the four represented predicates.
100-
101-
////
102-
.Typical predicate string
103-
----
104-
\n\t{\"name\" : \"<PredicateName>\", \"label\" : \"<label>\", \"<condition>\" : \"<state>\"},
105-
----
106-
* `name` is the name of the predicate, such as `labelsPresence`.
107-
* `label` and `<label>` is the node label:value pair to match to apply the predicate, such `label:rack`.
108-
* `<condition>` and `<state>` is when the predicate should be applied, such as `presence:true`.
109-
110-
.Typical priority string
111-
----
112-
\n\t{\"name\" : \"<PredicateName>\", \"label\" : \"<label>\", \"<condition>\" : \"<state>\", \"weight\" : <weight>},
113-
----
114-
* `name` is the name of the priority, such as `labelsPresence`.
115-
* `label` and `<label>` is the node `label:value` pair to match to apply the priority, such `label:rack`.
116-
* `<condition>` and `<state>` is when the priority should be applied, such as `presence:true`.
117-
* `weight` and `<weight> is the numerical weight to apply to the priority.
118-
////

modules/nodes-scheduler-default-creating.adoc

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)