From ccc5a30e00144bdb7a9cc2339aa2cb65defdb230 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Tue, 29 Mar 2016 15:23:25 -0400 Subject: 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 --- roles/openshift_facts/library/openshift_facts.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'roles/openshift_facts') 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={}, -- cgit v1.2.3