discover.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:CPU-Manager-for-Kubernetes 作者: Intel-Corp 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号