diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-01 09:00:07 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-04-01 09:00:07 -0400 |
commit | c8f5f05df668eaa6502b17fed9dc8099e7fab258 (patch) | |
tree | a7f28710e0c2c599c7c914084d3fb1849bf9226a /roles/openshift_master | |
parent | c818db9b485b19256e1c19573cd0640fdabcb109 (diff) | |
parent | ccc5a30e00144bdb7a9cc2339aa2cb65defdb230 (diff) | |
download | openshift-c8f5f05df668eaa6502b17fed9dc8099e7fab258.tar.gz openshift-c8f5f05df668eaa6502b17fed9dc8099e7fab258.tar.bz2 openshift-c8f5f05df668eaa6502b17fed9dc8099e7fab258.tar.xz openshift-c8f5f05df668eaa6502b17fed9dc8099e7fab258.zip |
Merge pull request #1680 from detiber/scheduler_config
Allow for overriding scheduler config
Diffstat (limited to 'roles/openshift_master')
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 4 | ||||
-rw-r--r-- | roles/openshift_master/templates/scheduler.json.j2 | 15 | ||||
-rw-r--r-- | roles/openshift_master/vars/main.yml | 6 |
3 files changed, 8 insertions, 17 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 79b68dc3c..23994cdcf 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -65,9 +65,9 @@ - restart master controllers - name: Create the scheduler config - template: + copy: + content: "{{ scheduler_config | to_nice_json }}" dest: "{{ openshift_master_scheduler_conf }}" - src: scheduler.json.j2 backup: true notify: - restart master diff --git a/roles/openshift_master/templates/scheduler.json.j2 b/roles/openshift_master/templates/scheduler.json.j2 deleted file mode 100644 index cb5f43bb2..000000000 --- a/roles/openshift_master/templates/scheduler.json.j2 +++ /dev/null @@ -1,15 +0,0 @@ -{ - "kind": "Policy", - "apiVersion": "v1", - "predicates": [ - {"name": "MatchNodeSelector"}, - {"name": "PodFitsResources"}, - {"name": "PodFitsPorts"}, - {"name": "NoDiskConflict"}, - {"name": "Region", "argument": {"serviceAffinity" : {"labels" : ["region"]}}} - ],"priorities": [ - {"name": "LeastRequestedPriority", "weight": 1}, - {"name": "ServiceSpreadingPriority", "weight": 1}, - {"name": "Zone", "weight" : 2, "argument": {"serviceAntiAffinity" : {"label": "zone"}}} - ] -} diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml index 75f08e378..198f9235d 100644 --- a/roles/openshift_master/vars/main.yml +++ b/roles/openshift_master/vars/main.yml @@ -8,6 +8,12 @@ openshift_master_session_secrets_file: "{{ openshift_master_config_dir }}/sessio openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json" openshift_version: "{{ openshift_pkg_version | default(openshift_image_tag) | default(openshift.common.image_tag) | default('') }}" +scheduler_config: + kind: Policy + apiVersion: v1 + predicates: "{{ openshift.master.scheduler_predicates }}" + priorities: "{{ openshift.master.scheduler_priorities }}" + openshift_master_valid_grant_methods: - auto - prompt |