Netcracker / KubeMarine

Management tool for Kubernetes cluster deployment and maintenance
Apache License 2.0
121 stars 16 forks source link

Deprecated label for nodes #55

Closed alexarefev closed 5 months ago

alexarefev commented 2 years ago

There are warning messages in dump/degug.log:

 Applying label node-role.kubernetes.io/control-plane='' to Nodes with label node-role.kubernetes.io/master='' (deprecated)

It is related to Replace taint master with control-plane. In other words, node-role.kubernetes.io/master label will be replaced with node-role.kubernetes.io/control-plane label in Kubernetes v1.24

There are several files related to the label in Kubetools:

kubetool/procedures/check_paas.py:                        if 'node-role.kubernetes.io/master' not in node_description['metadata']['labels']:
kubetool/templates/plugins/calico-v3.20.yaml.j2:        - key: node-role.kubernetes.io/master
kubetool/templates/plugins/calico-v3.19.yaml.j2:        - key: node-role.kubernetes.io/master
kubetool/kubernetes.py:                node["taints"].append("node-role.kubernetes.io/master:NoSchedule-")

It should be decided how to deal with the new label.

alexarefev commented 2 years ago

Since Kubetools supports several versions of Kubernetes we should process both the old and the new labels for a while. The idea is to check Kubernetes version and process the label that is applicable for the Kubernetes version. The code changes should be reviewed when Kubetools stops supporting Kubernetes version 1.23.

alexarefev commented 1 year ago

It was partly implemented in [MANOPD-75208] 'master' role replacement by 'control-plane' role