def discover(conf_dir):
version = k8s.get_kubelet_version(None)
if version == "v1.8.0":
logging.fatal("K8s 1.8.0 is not supported. Update K8s to "
"version >=1.8.1 or rollback to previous versions")
if version >= "v1.8.1":
# Patch the node with the appropriate CMK ER.
logging.debug("Patching the node with the appropriate CMK ER.")
add_node_er(conf_dir)
else:
# Patch the node with the appropriate CMK OIR.
logging.debug("Patching the node with the appropriate CMK OIR.")
add_node_oir(conf_dir)
# Add appropriate CMK label to the node.
logging.debug("Adding appropriate CMK label to the node.")
add_node_label()
# Add appropriate CMK taint to the node.
logging.debug("Adding appropriate CMK taint to the node.")
add_node_taint()
# add_node_oir patches the node with the appropriate CMK OIR.
评论列表
文章目录