Fix for Issue #2141

This commit is contained in:
Virgil Chereches 2018-01-12 07:07:02 +00:00
parent 32333eb627
commit c87bb2f239
2 changed files with 21 additions and 1 deletions

View file

@ -9,6 +9,13 @@
- meta: flush_handlers - meta: flush_handlers
- name: Write kube-scheduler policy file
template:
src: kube-scheduler-policy.yaml.j2
dest: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"
tags:
- kube-scheduler
- name: Write kube-scheduler kubeconfig - name: Write kube-scheduler kubeconfig
template: template:
src: kube-scheduler-kubeconfig.yaml.j2 src: kube-scheduler-kubeconfig.yaml.j2
@ -39,4 +46,4 @@
tags: tags:
- kube-controller-manager - kube-controller-manager
- meta: flush_handlers - meta: flush_handlers

View file

@ -28,6 +28,9 @@ spec:
- scheduler - scheduler
- --leader-elect=true - --leader-elect=true
- --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml - --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml
{% if cloud_provider == 'openstack' %}
- --policy-config-file={{ kube_config_dir }}/kube-scheduler-policy.yaml
{% endif %}
- --profiling=false - --profiling=false
- --v={{ kube_log_level }} - --v={{ kube_log_level }}
{% if kube_feature_gates %} {% if kube_feature_gates %}
@ -62,6 +65,11 @@ spec:
- mountPath: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml" - mountPath: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"
name: kubeconfig name: kubeconfig
readOnly: true readOnly: true
{% if cloud_provider == 'openstack' %}
- mountPath: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"
name: kube-scheduler-policy
readOnly: true
{% endif %}
volumes: volumes:
- name: ssl-certs-host - name: ssl-certs-host
hostPath: hostPath:
@ -77,3 +85,8 @@ spec:
- name: kubeconfig - name: kubeconfig
hostPath: hostPath:
path: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml" path: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"
{% if cloud_provider == 'openstack' %}
- name: kube-scheduler-policy
hostPath:
path: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"
{% endif %}