commit
98300e3165
5 changed files with 47 additions and 1 deletions
|
@ -185,3 +185,8 @@ persistent_volumes_enabled: false
|
||||||
## Supplementary addresses that can be added in kubernetes ssl keys.
|
## Supplementary addresses that can be added in kubernetes ssl keys.
|
||||||
## That can be useful for example to setup a keepalived virtual IP
|
## That can be useful 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]
|
# 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
|
||||||
|
volume_cross_zone_attachment: false
|
||||||
|
|
|
@ -85,3 +85,6 @@ scheduler_custom_flags: []
|
||||||
# kubeadm settings
|
# kubeadm settings
|
||||||
# Value of 0 means it never expires
|
# Value of 0 means it never expires
|
||||||
kubeadm_token_ttl: 0
|
kubeadm_token_ttl: 0
|
||||||
|
|
||||||
|
## Variable for influencing kube-scheduler behaviour
|
||||||
|
volume_cross_zone_attachment: false
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"kind" : "Policy",
|
||||||
|
"apiVersion" : "v1",
|
||||||
|
"predicates" : [
|
||||||
|
{"name" : "PodFitsHostPorts"},
|
||||||
|
{"name" : "PodFitsResources"},
|
||||||
|
{"name" : "NoDiskConflict"},
|
||||||
|
{"name" : "MatchNodeSelector"},
|
||||||
|
{"name" : "HostName"}
|
||||||
|
],
|
||||||
|
"priorities" : [
|
||||||
|
{"name" : "LeastRequestedPriority", "weight" : 1},
|
||||||
|
{"name" : "BalancedResourceAllocation", "weight" : 1},
|
||||||
|
{"name" : "ServiceSpreadingPriority", "weight" : 1},
|
||||||
|
{"name" : "EqualPriority", "weight" : 1}
|
||||||
|
],
|
||||||
|
"hardPodAffinitySymmetricWeight" : 10
|
||||||
|
}
|
|
@ -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 volume_cross_zone_attachment %}
|
||||||
|
- --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 volume_cross_zone_attachment %}
|
||||||
|
- 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 volume_cross_zone_attachment %}
|
||||||
|
- name: kube-scheduler-policy
|
||||||
|
hostPath:
|
||||||
|
path: "{{ kube_config_dir }}/kube-scheduler-policy.yaml"
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue