Align node-role value for kubeadm compatibility (#3558)

kubeadm sets node label node-role.kubernetes.io/master=''
and this is not configurable. We should use it everywhere.
This commit is contained in:
Matthew Mosesohn 2018-10-20 17:12:54 +03:00 committed by k8s-ci-robot
parent 4b711e29ef
commit 127969d65f
7 changed files with 11 additions and 11 deletions

View file

@ -44,7 +44,7 @@ cephfs_provisioner_enabled: false
ingress_nginx_enabled: false
# ingress_nginx_host_network: false
# ingress_nginx_nodeselector:
# node-role.kubernetes.io/master: "true"
# node-role.kubernetes.io/master: ""
# ingress_nginx_namespace: "ingress-nginx"
# ingress_nginx_insecure_port: 80
# ingress_nginx_secure_port: 443

View file

@ -2,7 +2,7 @@
ingress_nginx_namespace: "ingress-nginx"
ingress_nginx_host_network: false
ingress_nginx_nodeselector:
node-role.kubernetes.io/master: "true"
node-role.kubernetes.io/master: ""
ingress_nginx_insecure_port: 80
ingress_nginx_secure_port: 443
ingress_nginx_configmap: {}

View file

@ -81,12 +81,12 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
{# Kubelet node labels #}
{% set role_node_labels = [] %}
{% if inventory_hostname in groups['kube-master'] %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/master=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/master=''") %}
{% if not standalone_kubelet|bool %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/node=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/node=''") %}
{% endif %}
{% else %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/node=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/node=''") %}
{% endif %}
{% set inventory_node_labels = [] %}
{% if node_labels is defined %}

View file

@ -95,12 +95,12 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}"
{# Kubelet node labels #}
{% set role_node_labels = [] %}
{% if inventory_hostname in groups['kube-master'] %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/master=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/master=''") %}
{% if not standalone_kubelet|bool %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/node=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/node=''") %}
{% endif %}
{% else %}
{% set dummy = role_node_labels.append('node-role.kubernetes.io/node=true') %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/node=''") %}
{% endif %}
{% if nvidia_gpu_nodes is defined and nvidia_accelerator_enabled|bool %}
{% if inventory_hostname in nvidia_gpu_nodes %}

View file

@ -27,7 +27,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node-role.kubernetes.io/master: "true"
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)

View file

@ -23,7 +23,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node-role.kubernetes.io/master: "true"
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)

View file

@ -27,7 +27,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node-role.kubernetes.io/master: "true"
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)