intelligent-machine-learning/dlrover

Enhance/Replace k8s python client.

Open

#1,291 创建于 2024年10月12日

在 GitHub 查看
 (2 评论) (0 反应) (1 负责人)Python (212 fork)github user discovery
Hacktoberfestwip

仓库指标

Star
 (1,662 star)
PR 合并指标
 (PR 指标待抓取)

描述

Background

Currently, DLRover uses the official Kubernetes Python client to interact with the Kubernetes API Server. This part of implementations are quite important because it involves managing the lifecycle of training workers. However, the Python client has inherent limitations and lags behind the Go (and Java) clients (e.g., lacks an informer implementation), leading to occasional unexpected usage issues in certain scenarios. Therefore, we intend to:

[Option 1] Replace the current Python client with the Go client(need to use CFFI). [Option 2] Enhance k8s client implements in python.

Requirement

The enhancement/replacement should ensure compatibility with all existing Kubernetes-related calls while also adapting the usage in dlrover/python/scheduler/kubernetes.py.

  1. Ensure compatibility with all related features (no regression).
  2. Reimplement the watch mechanism using the 'informer'. (dlrover/python/master/watcher/k8s_watcher.py)

For replacement scheme requires evaluation of:

  1. Limitations on different system platforms.
  2. Issues with cross-language object transfer.
  3. Potential performance overhead.
  4. Additional costs for building and deployment.

For enhancement scheme requires evaluation of:

  1. Feasibility and complexity of implementation.

贡献者指南