From 96688269f8d1c850d3f5c0fbaf2e1ad31fb7eb4a Mon Sep 17 00:00:00 2001 From: Danny Kulchinsky Date: Mon, 28 Jan 2019 02:43:34 -0500 Subject: [PATCH] Support both --address and --bind-address for scheduler and controller-manager (#4112) --- .../master/templates/kubeadm-config.v1alpha3.yaml.j2 | 8 ++++++++ .../master/templates/kubeadm-config.v1beta1.yaml.j2 | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 index 5a526790f..086bb1a54 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha3.yaml.j2 @@ -129,7 +129,11 @@ controllerManagerExtraArgs: node-monitor-period: {{ kube_controller_node_monitor_period }} pod-eviction-timeout: {{ kube_controller_pod_eviction_timeout }} node-cidr-mask-size: "{{ kube_network_node_prefix }}" +{% if kube_version is version('v1.14', '<') %} + address: {{ kube_controller_manager_bind_address }} +{% else %} bind-address: {{ kube_controller_manager_bind_address }} +{% endif %} {% if kube_feature_gates %} feature-gates: {{ kube_feature_gates|join(',') }} {% endif %} @@ -143,7 +147,11 @@ controllerManagerExtraArgs: cloud-config: {{ kube_config_dir }}/cloud_config {% endif %} schedulerExtraArgs: +{% if kube_version is version('v1.14', '<') %} + address: {{ kube_scheduler_bind_address }} +{% else %} bind-address: {{ kube_scheduler_bind_address }} +{% endif %} {% if kube_feature_gates %} feature-gates: {{ kube_feature_gates|join(',') }} {% endif %} diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 index 9966ebac2..a34268ae2 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1beta1.yaml.j2 @@ -172,7 +172,11 @@ controllerManager: node-monitor-period: {{ kube_controller_node_monitor_period }} pod-eviction-timeout: {{ kube_controller_pod_eviction_timeout }} node-cidr-mask-size: "{{ kube_network_node_prefix }}" +{% if kube_version is version('v1.14', '<') %} + address: {{ kube_controller_manager_bind_address }} +{% else %} bind-address: {{ kube_controller_manager_bind_address }} +{% endif %} {% if kube_feature_gates %} feature-gates: {{ kube_feature_gates|join(',') }} {% endif %} @@ -206,7 +210,11 @@ controllerManager: {% endif %} scheduler: extraArgs: +{% if kube_version is version('v1.14', '<') %} + address: {{ kube_scheduler_bind_address }} +{% else %} bind-address: {{ kube_scheduler_bind_address }} +{% endif %} {% if kube_feature_gates %} feature-gates: {{ kube_feature_gates|join(',') }} {% endif %}