Skip to content

Commit

Permalink
Adding sample scheduler object
Browse files Browse the repository at this point in the history
  • Loading branch information
mburke5678 committed May 21, 2019
1 parent 00c8d04 commit b6e56b9
Show file tree
Hide file tree
Showing 37 changed files with 79 additions and 63 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source "https://rubygems.org"

gem 'ascii_binder', '~>0.1.5'

4 changes: 2 additions & 2 deletions _topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ Topics:
Topics:
- Name: About pod placement using the scheduler
File: nodes-scheduler-about
- Name: Placing pods onto nodes with the default scheduler
- Name: Configuring the default scheduler to control pod placement
File: nodes-scheduler-default
- Name: Placing pods relative to other pods using pod affinity/anti-affinity rules
- Name: Placing pods relative to other pods using pod affinity and anti-affinity rules
File: nodes-scheduler-pod-affinity
- Name: Controlling pod placement on nodes using node affinity rules
File: nodes-scheduler-node-affinity
Expand Down
4 changes: 4 additions & 0 deletions modules/nodes-pods-priority-disabling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ To disable the preemption for the cluster:
. Edit the Scheduler Operator Custom Resource to add the `disablePreemption: true` parameter:
+
----
oc edit scheduler cluster
----
+
----
apiVersion: config.openshift.io/v1
kind: Scheduler
metadata:
Expand Down
13 changes: 5 additions & 8 deletions modules/nodes-scheduler-default-creating.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ $ oc create configmap -n openshift-config --from-file=policy.cfg scheduler-polic
configmap/scheduler-policy created
----

. Edit the *_scheduler.yaml_* file, installed by default, to add the ConfigMap.
. Edit the Scheduler Operator Custom Resource to add the ConfigMap:
+
----
$ oc edit scheduler cluster
----
+
----
apiVersion: config.openshift.io/v1
Expand All @@ -82,9 +85,3 @@ spec: {}
policy:
name: scheduler-policy
----

. Create the `scheduler` object:
+
----
$ oc create -f scheduler.yaml
----
2 changes: 1 addition & 1 deletion nodes/clusters/nodes-cluster-overcommit.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-cluster-overcommit
[id="nodes-cluster-overcommit_{context}"]
[id="nodes-cluster-overcommit"]
= Configuring your cluster to place pods on overcommited nodes in {product-title}
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/clusters/nodes-cluster-resource-configure.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-cluster-resource-configure
[id="nodes-cluster-resource-configure_{context}"]
[id="nodes-cluster-resource-configure"]
= Configuring cluster memory to meet container memory and risk requirements in {product-title}
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/clusters/nodes-cluster-resource-levels.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-cluster-resource-levels
[id="nodes-cluster-resource-levels_{context}"]
[id="nodes-cluster-resource-levels"]
= Estimating the number of pods your {product-title} nodes can hold
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/clusters/nodes-containers-events.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-events
[id="nodes-containers-events_{context}"]
[id="nodes-containers-events"]
= Viewing system event information in an {product-title} cluster
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-copying-files.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-copying-files
[id="nodes-containers-copying-files_{context}"]
[id="nodes-containers-copying-files"]
= Copying files to or from an {product-title} container
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-downward-api.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-downward-api
[id="nodes-containers-downward-api_{context}"]
[id="nodes-containers-downward-api"]
= Allowing containers to consume API objects
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-health.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-containers-health
[id="nodes-nodes-health_{context}"]
[id="nodes-nodes-health"]
= Monitoring container health
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-init.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-init
[id="nodes-containers-init_{context}"]
[id="nodes-containers-init"]
= Using Init Containers to perform tasks before a pod is deployed
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-port-forwarding.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-port-forwarding
[id="nodes-containers-port-forwarding_{context}"]
[id="nodes-containers-port-forwarding"]
= Using port forwarding to access applications in a container
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-projected-volumes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-projected-volumes
[id="nodes-containers-projected-volumes_{context}"]
[id="nodes-containers-projected-volumes"]
= Mapping volumes using projected volumes
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-remote-commands.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-remote-commands
[id="nodes-containers-remote-commands_{context}"]
[id="nodes-containers-remote-commands"]
= Executing remote commands in an {product-title} container
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-using.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-using
[id="nodes-containers-using_{context}"]
[id="nodes-containers-using"]
= Understanding Containers in {product-title}
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/containers/nodes-containers-volumes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-containers-volumes
[id="nodes-containers-volumes_{context}"]
[id="nodes-containers-volumes"]
= Using volumes to persist container data
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/jobs/nodes-nodes-jobs.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-jobs
[id="nodes-nodes-jobs_{context}"]
[id="nodes-nodes-jobs"]
= Running tasks in pods using jobs in {product-title}
include::modules/common-attributes.adoc[]

Expand Down
4 changes: 2 additions & 2 deletions nodes/nodes/nodes-nodes-audit-log.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-nodes-working
[id="nodes-nodes-audit-log_{context}"]
:context: nodes-nodes-audit-log
[id="nodes-nodes-audit-log"]
= Viewing node audit logs
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-managing-max-pods.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-nodes-jobs
[id="nodes-nodes-managing-max-pods_{context}"]
[id="nodes-nodes-managing-max-pods"]
= Managing the maximum number of Pods per Node
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-managing.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-jobs
[id="nodes-nodes-managing_{context}"]
[id="nodes-nodes-managing"]
= Managing Nodes
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-modifying.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-modifying
[id="nodes-nodes-modifying_{context}"]
[id="nodes-nodes-modifying"]
= Modifying existing nodes in your {product-title} cluster
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-opaque-resources.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-opaque-resources
[id="nodes-nodes-opaque-resources_{context}"]
[id="nodes-nodes-opaque-resources"]
= Advertising hidden resources for nodes in an {product-title} cluster
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-rebooting.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-rebooting
[id="nodes-nodes-rebooting_{context}"]
[id="nodes-nodes-rebooting"]
= Understanding node rebooting in {product-title}
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-resources-configuring.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-resources-configuring
[id="nodes-nodes-resources-configuring_{context}"]
[id="nodes-nodes-resources-configuring"]
= Allocating resources for nodes in an {product-title} cluster
include::modules/common-attributes.adoc[]

Expand Down
2 changes: 1 addition & 1 deletion nodes/nodes/nodes-nodes-viewing.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

:context: nodes-nodes-viewing
[id="nodes-nodes-viewing_{context}"]
[id="nodes-nodes-viewing"]
= Viewing and listing the nodes in your {product-title} cluster
include::modules/common-attributes.adoc[]

Expand Down
4 changes: 2 additions & 2 deletions nodes/nodes/nodes-nodes-working.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

:context: nodes-nodes-working
[id="nodes-nodes-working_{context}"]
= Working with nodes in {product-title}
[id="nodes-nodes-working"]
= Working with nodes
include::modules/common-attributes.adoc[]

toc::[]
Expand Down
2 changes: 1 addition & 1 deletion nodes/pods/nodes-pods-node-selectors.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-pods-node-selectors
[id="nodes-pods-node-selectors_{context}"]
[id="nodes-pods-node-selectors"]
= Placing pods on specific nodes using node selectors
include::modules/common-attributes.adoc[]
:relfileprefix: ../
Expand Down
21 changes: 9 additions & 12 deletions nodes/scheduling/nodes-scheduler-about.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-about
[id="nodes-scheduler-about_{context}"]
= Controlling pod placement using the {product-title} scheduler
[id="nodes-scheduler-about"]
= Controlling pod placement using the scheduler
include::modules/common-attributes.adoc[]


Expand All @@ -21,18 +21,15 @@ creates bindings (pod to node bindings) for the pods using the master API.
// assemblies.

Default pod scheduling::
OpenShift Container Platform comes with a default scheduler that serves the needs of most users. The default scheduler uses both inherent and customization tools to determine the best fit for a pod.
OpenShift Container Platform comes with a xref:../../nodes/scheduling/nodes-scheduler-default.adoc[default scheduler] that serves the needs of most users. The default scheduler uses both inherent and customization tools to determine the best fit for a pod.

Advanced pod scheduling::
In situations where you might want more control over where new pods are placed, the OpenShift Container Platform advanced scheduling features allow you to configure a pod so that the pod is required or has a preference to run on a particular node or alongside a specific pod by.

* Using pod affinity and anti-affinity rules
* Placing a pod on a node by name
* Placing a pod in a specific project
* Placing pods on overcomitted nodes
* Controlling pod placement with node affinity
* Controlling pod placement with taints and tolerations
* Controlling pod placement with node selectors
* Using xref:../../nodes/scheduling/nodes-scheduler-pod-affinity.adoc[pod affinity and anti-affinity rules] #nodes-scheduler-pod-affinity_nodes-scheduler-pod-affinity.
* Controlling pod placement with xref:../../nodes/scheduling/nodes-scheduler-pod-affinity.adoc[pod affinity]. #nodes-scheduler-pod-affinity_nodes-scheduler-pod-affinity
* Controlling pod placement with xref:../../nodes/scheduling/nodes-scheduler-node-affinity.adoc[node affinity]. #nodes-scheduler-node-affinity_nodes-scheduler-node-affinity
* Placing pods on xref:../../nodes/scheduling/nodes-scheduler-overcommit.adoc[overcomitted nodes]. #nodes-scheduler-overcommit_nodes-scheduler-overcommit
* Controlling pod placement with xref:../../nodes/scheduling/nodes-scheduler-node-selectors.adoc[node selectors]. #nodes-scheduler-node-selectors_nodes-scheduler-node-selectors
* Controlling pod placement with xref:../../nodes/scheduling/nodes-scheduler-taints-tolerations.adoc[taints and tolerations]. #nodes-scheduler-taints-tolerations_nodes-scheduler-taints-tolerations
Removing pods from nodes based priority::
You can configure the pod scheduler to evict, or preempt, lower-priority pods in order to schedule higher-priority pods.
21 changes: 19 additions & 2 deletions nodes/scheduling/nodes-scheduler-default.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-default
[id="nodes-scheduler-default_{context}"]
= Configuring the default scheduler to control pod placement in {product-title}
[id="nodes-scheduler-default"]
= Configuring the default scheduler to control pod placement
include::modules/common-attributes.adoc[]
:relfileprefix: ../

Expand All @@ -16,6 +16,23 @@ independent and exists as a standalone/pluggable solution. It does not modify
the pod and just creates a binding for the pod that ties the pod to the
particular node.

.Sample default scheduler object
----
apiVersion: config.openshift.io/v1
kind: Scheduler
metadata:
annotations:
release.openshift.io/create-only: "true"
creationTimestamp: 2019-05-20T15:39:01Z
generation: 1
name: cluster
resourceVersion: "1491"
selfLink: /apis/config.openshift.io/v1/schedulers/cluster
uid: 6435dd99-7b15-11e9-bd48-0aec821b8e34
spec: {} <1>
----
<1> Edit the `spec` stanza to configure the default scheduler.

// The following include statements pull in the module files that comprise
// the assembly. Include any combination of concept, procedure, or reference
// modules required to cover the user story. You can also include other
Expand Down
4 changes: 2 additions & 2 deletions nodes/scheduling/nodes-scheduler-node-affinity.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-node-affinity
[id="nodes-scheduler-node-affinity_{context}"]
= Controlling pod placement on nodes using node affinity rules in {product-title}
[id="nodes-scheduler-node-affinity"]
= Controlling pod placement on nodes using node affinity rules
include::modules/common-attributes.adoc[]
:relfileprefix: ../

Expand Down
6 changes: 3 additions & 3 deletions nodes/scheduling/nodes-scheduler-node-names.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-node-names
[id="nodes-scheduler-node-names_{context}"]
= Placing a pod on a specific node by name in {product-title}
[id="nodes-scheduler-node-names"]
= Placing a pod on a specific node by name
include::modules/common-attributes.adoc[]
:relfileprefix: ../

Expand All @@ -27,5 +27,5 @@ include::modules/nodes-scheduler-node-names-configuring.adoc[leveloffset=+1]
[id="nodes-scheduler-node-names-addtl-resources_{context}"]
== Additional resources

For information about changing node labels, see xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-updating-nodes-nodes-working[Understanding how to update labels on nodes].
For information about changing node labels, see xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-updating_nodes-nodes-working[Understanding how to update labels on nodes].

2 changes: 1 addition & 1 deletion nodes/scheduling/nodes-scheduler-node-projects.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-scheduler-node-project
[id="nodes-scheduler-node-project_{context}"]
[id="nodes-scheduler-node-project"]
= Placing a pod in a specific project in {product-title}
include::modules/common-attributes.adoc[]
:relfileprefix: ../
Expand Down
2 changes: 1 addition & 1 deletion nodes/scheduling/nodes-scheduler-node-selectors.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:context: nodes-scheduler-node-selectors
[id="nodes-scheduler-node-selectors_{context}"]
[id="nodes-scheduler-node-selectors"]
= Placing pods on specific nodes using node selectors
include::modules/common-attributes.adoc[]
:relfileprefix: ../
Expand Down
4 changes: 2 additions & 2 deletions nodes/scheduling/nodes-scheduler-overcommit.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-sceduler-overcommit
[id="nodes-scheduler-overcommit_{context}"]
= Placing pods onto overcommited nodes in {product-title}
[id="nodes-scheduler-overcommit"]
= Placing pods onto overcommited nodes
include::modules/common-attributes.adoc[]

toc::[]
Expand Down
4 changes: 2 additions & 2 deletions nodes/scheduling/nodes-scheduler-pod-affinity.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-pod-affinity
[id="nodes-scheduler-pod-affinity_{context}"]
= Placing pods relative to other pods using affinity/anti-affinity rules in {product-title}
[id="nodes-scheduler-pod-affinity"]
= Placing pods relative to other pods using affinity and anti-affinity rules
include::modules/common-attributes.adoc[]
:relfileprefix: ../

Expand Down
4 changes: 2 additions & 2 deletions nodes/scheduling/nodes-scheduler-taints-tolerations.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:context: nodes-scheduler-taints-tolerations
[id="nodes-scheduler-taints-tolerations_{context}"]
= Controlling pod placement using node taints in {product-title}
[id="nodes-scheduler-taints-tolerations"]
= Controlling pod placement using node taints
include::modules/common-attributes.adoc[]
:relfileprefix: ../

Expand Down

0 comments on commit b6e56b9

Please sign in to comment.