Skip to content

Commit

Permalink
'control-plane' and 'master' replacement (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexarefev authored May 13, 2022
1 parent 822aa58 commit 4270901
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kubemarine/procedures/check_paas.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,14 @@ def kubernetes_nodes_roles(cluster):
for node_description in nodes_description['items']:
node_name = node_description['metadata']['name']
if node['name'] == node_name:
if 'master' in node['roles']:
if 'node-role.kubernetes.io/master' not in node_description['metadata']['labels']:
if 'control-plane' in node['roles']:
# TODO check label accordingly to Kubernetes version
if 'node-role.kubernetes.io/master' not in node_description['metadata']['labels'] and \
'node-role.kubernetes.io/control-plane' not in node_description['metadata']['labels']:
nodes_with_bad_roles.append(node['name'])
cluster.log.error("Node \"%s\" has to be master, but has invalid role" % node['name'])
cluster.log.error("Node \"%s\" has to be control-plane, but has invalid role" % node['name'])
else:
cluster.log.debug("Node \"%s\" has correct master role" % node['name'])
cluster.log.debug("Node \"%s\" has correct control-plane role" % node['name'])
elif 'worker' in node['roles']:
if 'node-role.kubernetes.io/worker' not in node_description['metadata']['labels']:
nodes_with_bad_roles.append(node['name'])
Expand Down

0 comments on commit 4270901

Please sign in to comment.