Browse Source

Added optional controller and scheduler extra args to kubeadm config (#2205)

pull/2255/head
Maxim Krasilnikov 6 years ago
committed by Matthew Mosesohn
parent
commit
95b8ac5f62
2 changed files with 13 additions and 1 deletions
  1. 5
      roles/kubernetes/master/defaults/main.yml
  2. 9
      roles/kubernetes/master/templates/kubeadm-config.yaml.j2

5
roles/kubernetes/master/defaults/main.yml

@ -83,8 +83,11 @@ controller_mgr_custom_flags: []
scheduler_custom_flags: [] 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
## Extra args for k8s components passing by kubeadm
kube_kubeadm_controller_extra_args: {}
kube_kubeadm_scheduler_extra_args: {}
## Variable for influencing kube-scheduler behaviour ## Variable for influencing kube-scheduler behaviour
volume_cross_zone_attachment: false volume_cross_zone_attachment: false

9
roles/kubernetes/master/templates/kubeadm-config.yaml.j2

@ -67,6 +67,15 @@ controllerManagerExtraArgs:
{% if kube_feature_gates %} {% if kube_feature_gates %}
feature-gates: {{ kube_feature_gates|join(',') }} feature-gates: {{ kube_feature_gates|join(',') }}
{% endif %} {% endif %}
{% for key in kube_kubeadm_controller_extra_args %}
{{ key }}: {{ kube_kubeadm_controller_extra_args[key] }}
{% endfor %}
{% if kube_kubeadm_scheduler_extra_args|length > 0 %}
schedulerExtraArgs:
{% for key in kube_kubeadm_scheduler_extra_args %}
{{ key }}: {{ kube_kubeadm_scheduler_extra_args[key] }}
{% endfor %}
{% endif %}
apiServerCertSANs: apiServerCertSANs:
{% for san in apiserver_sans.split(' ') | unique %} {% for san in apiserver_sans.split(' ') | unique %}
- {{ san }} - {{ san }}

Loading…
Cancel
Save