Skip to content

Commit

Permalink
Revert "Fix for unknown 'kubernetes.io' or 'k8s.io' labels specified …
Browse files Browse the repository at this point in the history
…with --node-labels (#4320)" (#4553)

This reverts commit 586ad89.
  • Loading branch information
Miouge1 authored and k8s-ci-robot committed Apr 17, 2019
1 parent 1cf76a1 commit ec3daed
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions inventory/sample/group_vars/k8s-cluster/addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ rbd_provisioner_enabled: false
ingress_nginx_enabled: false
# ingress_nginx_host_network: false
# ingress_nginx_nodeselector:
# node.kubernetes.io/node: ""
# node-role.kubernetes.io/node: ""
# ingress_nginx_tolerations:
# - key: "node.kubernetes.io/master"
# - key: "node-role.kubernetes.io/master"
# operator: "Equal"
# value: ""
# effect: "NoSchedule"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
beta.kubernetes.io/os: linux
serviceAccountName: coredns
tolerations:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
effect: NoSchedule
- key: "CriticalAddonsOnly"
operator: "Exists"
Expand All @@ -46,7 +46,7 @@ spec:
- weight: 100
preference:
matchExpressions:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes-apps/ansible/templates/dashboard.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ spec:
serviceAccountName: kubernetes-dashboard
{% if dashboard_master_toleration %}
tolerations:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
effect: NoSchedule
{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions roles/kubernetes-apps/ansible/templates/dns-autoscaler.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
tolerations:
- effect: NoSchedule
operator: Equal
key: node.kubernetes.io/master
key: node-role.kubernetes.io/master
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -58,7 +58,7 @@ spec:
- weight: 100
preference:
matchExpressions:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ spec:
serviceAccountName: cloud-controller-manager
hostNetwork: true
nodeSelector:
node.kubernetes.io/master: ""
node-role.kubernetes.io/master: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ingress_nginx_namespace: "ingress-nginx"
ingress_nginx_host_network: false
ingress_nginx_nodeselector:
node.kubernetes.io/node: ""
node-role.kubernetes.io/node: ""
ingress_nginx_tolerations: []
ingress_nginx_insecure_port: 80
ingress_nginx_secure_port: 443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ spec:
name: metrics-server-config
{% if not masters_are_not_tainted %}
tolerations:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
effect: NoSchedule
- key: "CriticalAddonsOnly"
operator: "Exists"
Expand All @@ -127,7 +127,7 @@ spec:
- weight: 100
preference:
matchExpressions:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
operator: In
values:
- ""
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
effect: NoSchedule
{% if kube_version is version('v1.11.1', '>=') %}
priorityClassName: system-cluster-critical
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes/master/tasks/kubeadm-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
- old_apiserver_cert.stat.exists

- name: kubeadm | Remove taint for master with node role
command: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf taint node {{ inventory_hostname }} node.kubernetes.io/master:NoSchedule-"
command: "{{ bin_dir }}/kubectl --kubeconfig {{ kube_config_dir }}/admin.conf taint node {{ inventory_hostname }} node-role.kubernetes.io/master:NoSchedule-"
delegate_to: "{{groups['kube-master']|first}}"
when: inventory_hostname in groups['kube-node']
failed_when: false
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ nodeRegistration:
{% if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] %}
taints:
- effect: NoSchedule
key: node.kubernetes.io/master
key: node-role.kubernetes.io/master
{% endif %}
{% if container_manager == 'crio' %}
criSocket: /var/run/crio/crio.sock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nodeRegistration:
{% if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] %}
taints:
- effect: NoSchedule
key: node.kubernetes.io/master
key: node-role.kubernetes.io/master
{% endif %}
{% if container_manager == 'crio' %}
criSocket: /var/run/crio/crio.sock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ nodeRegistration:
{% if inventory_hostname in groups['kube-master'] and inventory_hostname not in groups['kube-node'] %}
taints:
- effect: NoSchedule
key: node.kubernetes.io/master
key: node-role.kubernetes.io/master
{% endif %}
{% if container_manager == 'crio' %}
criSocket: /var/run/crio/crio.sock
Expand Down
6 changes: 3 additions & 3 deletions roles/kubernetes/node/templates/kubelet.kubeadm.env.j2
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,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.kubernetes.io/master=''") %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/master=''") %}
{% if not standalone_kubelet|bool %}
{% set dummy = role_node_labels.append("node.kubernetes.io/node=''") %}
{% set dummy = role_node_labels.append("node-role.kubernetes.io/node=''") %}
{% endif %}
{% else %}
{% set dummy = role_node_labels.append("node.kubernetes.io/node=''") %}
{% 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 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node.kubernetes.io/master: ""
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node.kubernetes.io/node: ""
node-role.kubernetes.io/node: ""
containers:
- name: contiv-etcd-proxy
image: {{ contiv_etcd_image_repo }}:{{ contiv_etcd_image_tag }}
Expand Down
2 changes: 1 addition & 1 deletion roles/network_plugin/contiv/templates/contiv-etcd.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node.kubernetes.io/master: ""
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
hostNetwork: true
hostPID: true
nodeSelector:
node.kubernetes.io/master: ""
node-role.kubernetes.io/master: ""
tolerations:
- operator: Exists
# Mark pod as critical for rescheduling (Will have no effect starting with kubernetes 1.12)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
nodeSelector:
beta.kubernetes.io/arch: amd64
tolerations:
- key: node.kubernetes.io/master
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
serviceAccountName: multus
Expand Down

0 comments on commit ec3daed

Please sign in to comment.