2022-06-06 23:10:10 +08:00
|
|
|
{% if kube_version is version('v1.23.0', '<') %}
|
2021-12-21 17:38:46 +08:00
|
|
|
{% set kubescheduler_config_api_version = "v1beta2" %}
|
|
|
|
{% else %}
|
|
|
|
{% set kubescheduler_config_api_version = "v1beta3" %}
|
|
|
|
{% endif %}
|
|
|
|
apiVersion: kubescheduler.config.k8s.io/{{ kubescheduler_config_api_version|d('v1') }}
|
2021-04-06 15:35:35 +08:00
|
|
|
kind: KubeSchedulerConfiguration
|
|
|
|
clientConnection:
|
|
|
|
kubeconfig: "{{ kube_config_dir }}/scheduler.conf"
|
|
|
|
{% for key in kube_scheduler_client_conn_extra_opts %}
|
|
|
|
{{ key }}: {{ kube_scheduler_client_conn_extra_opts[key] }}
|
|
|
|
{% endfor %}
|
|
|
|
{% if kube_scheduler_extenders %}
|
|
|
|
extenders:
|
|
|
|
{{ kube_scheduler_extenders | to_nice_yaml(indent=2, width=256) }}
|
|
|
|
{% endif %}
|
|
|
|
leaderElection:
|
|
|
|
leaseDuration: {{ kube_scheduler_leader_elect_lease_duration }}
|
|
|
|
renewDeadline: {{ kube_scheduler_leader_elect_renew_deadline }}
|
|
|
|
{% for key in kube_scheduler_leader_elect_extra_opts %}
|
|
|
|
{{ key }}: {{ kube_scheduler_leader_elect_extra_opts[key] }}
|
|
|
|
{% endfor %}
|
|
|
|
{% if kube_scheduler_profiles %}
|
|
|
|
profiles:
|
|
|
|
{{ kube_scheduler_profiles | to_nice_yaml(indent=2, width=256) }}
|
|
|
|
{% endif %}
|
|
|
|
{% for key in kube_scheduler_config_extra_opts %}
|
|
|
|
{{ key }}: {{ kube_scheduler_config_extra_opts[key] }}
|
|
|
|
{% endfor %}
|