kubespray/roles/kubernetes/control-plane/templates/kubescheduler-config.yaml.j2

30 lines
1.1 KiB
Django/Jinja

{% if kube_version is version('v1.23.0', '<') %}
{% 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') }}
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 %}