Added disable_volume_zone_conflict variable

This commit is contained in:
Virgil Chereches 2018-01-18 10:55:23 +00:00
parent 8c45c88d15
commit 3125f93b3f
3 changed files with 11 additions and 3 deletions

View file

@ -179,3 +179,8 @@ local_volumes_enabled: false
## Supplementary addresses that can be added in kubernetes ssl keys.
## That can be usefull for example to setup a keepalived virtual IP
# supplementary_addresses_in_ssl_keys: [10.0.0.1, 10.0.0.2, 10.0.0.3]
## Running on top of openstack vms with cinder enabled may lead to unschedulable pods due to NoVolumeZoneConflict restriction in kube-scheduler.
## See https://github.com/kubernetes-incubator/kubespray/issues/2141
## Set this variable to true to get rid of this issue
disable_volume_zone_conflict: false

View file

@ -80,3 +80,6 @@ scheduler_custom_flags: []
# kubeadm settings
# Value of 0 means it never expires
kubeadm_token_ttl: 0
## Variable for influencing kube-scheduler behaviour
disable_volume_zone_conflict: false

View file

@ -28,7 +28,7 @@ spec:
- scheduler
- --leader-elect=true
- --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml
{% if cloud_provider == 'openstack' %}
{% if cloud_provider == 'openstack' and disable_volume_zone_conflict %}
- --policy-config-file={{ kube_config_dir }}/kube-scheduler-policy.yaml
{% endif %}
- --profiling=false
@ -65,7 +65,7 @@ spec:
- mountPath: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"
name: kubeconfig
readOnly: true
{% if cloud_provider == 'openstack' %}
{% if cloud_provider == 'openstack' and disable_volume_zone_conflict %}
- mountPath: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"
name: kube-scheduler-policy
readOnly: true
@ -85,7 +85,7 @@ spec:
- name: kubeconfig
hostPath:
path: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"
{% if cloud_provider == 'openstack' %}
{% if cloud_provider == 'openstack' and disable_volume_zone_conflict %}
- name: kube-scheduler-policy
hostPath:
path: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"