summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-03-29 15:23:25 -0400
committerJason DeTiberus <jdetiber@redhat.com>2016-03-31 17:47:38 -0400
commitccc5a30e00144bdb7a9cc2339aa2cb65defdb230 (patch)
treea7f28710e0c2c599c7c914084d3fb1849bf9226a /roles/openshift_facts/library
parentc818db9b485b19256e1c19573cd0640fdabcb109 (diff)
downloadopenshift-ccc5a30e00144bdb7a9cc2339aa2cb65defdb230.tar.gz
openshift-ccc5a30e00144bdb7a9cc2339aa2cb65defdb230.tar.bz2
openshift-ccc5a30e00144bdb7a9cc2339aa2cb65defdb230.tar.xz
openshift-ccc5a30e00144bdb7a9cc2339aa2cb65defdb230.zip
Allow for overriding scheduler config
- introduce openshift_master_scheduler_predicates and openshift_master_scheduler_priorities to override the default scheduler predicates and priorities - switch default scheduler priorities to use SelectorSpreadPriority instead of ServiceSpreadingPriority
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 8411687a4..0d31d4ddf 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1492,6 +1492,19 @@ class OpenShiftFacts(object):
debug_level=2)
if 'master' in roles:
+ scheduler_predicates = [
+ {"name": "MatchNodeSelector"},
+ {"name": "PodFitsResources"},
+ {"name": "PodFitsPorts"},
+ {"name": "NoDiskConflict"},
+ {"name": "Region", "argument": {"serviceAffinity" : {"labels" : ["region"]}}}
+ ]
+ scheduler_priorities = [
+ {"name": "LeastRequestedPriority", "weight": 1},
+ {"name": "SelectorSpreadPriority", "weight": 1},
+ {"name": "Zone", "weight" : 2, "argument": {"serviceAntiAffinity" : {"label": "zone"}}}
+ ]
+
defaults['master'] = dict(api_use_ssl=True, api_port='8443',
controllers_port='8444',
console_use_ssl=True,
@@ -1507,7 +1520,9 @@ class OpenShiftFacts(object):
session_secrets_file='',
access_token_max_seconds=86400,
auth_token_max_seconds=500,
- oauth_grant_method='auto')
+ oauth_grant_method='auto',
+ scheduler_predicates=scheduler_predicates,
+ scheduler_priorities=scheduler_priorities)
if 'node' in roles:
defaults['node'] = dict(labels={}, annotations={},