-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为 Youki 实现 CRI 接口 #21
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: ichAB <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the CRI interface for Youki, adding YAML parsing support, a Pod concept using a pause container for namespace handling, and various container lifecycle commands (create, start, kill, delete, state).
- Added new CLI commands for container operations such as kill, start, state, create, and delete.
- Introduced Pod YAML configurations and persistent Pod metadata storage.
- Integrated enhanced root path determination and basic CRI module stubs.
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/commands/kill.rs | Implements the kill command with error handling based on status. |
src/commands/start.rs | Adds the start command with context error messages. |
src/commands/state.rs | Introduces a state command that prints container state. |
src/commands/create.rs | Implements the create command using a builder pattern. |
src/commands/delete.rs | Handles container deletion with force options and existence check. |
container_task1.yaml | Provides a simple Pod YAML definition with a container spec. |
src/rootpath.rs | Enhances root path determination based on environment conditions. |
src/main.rs | Integrates CLI command parsing and subcommand mapping. |
src/cli_commands.rs | Implements various pod operations (run, create, start, delete, state). |
Cargo.toml | Updates dependencies and adds necessary libraries. |
src/commands/mod.rs | Configures command modules and container loading helper functions. |
container_task.yaml | Adds an alternative Pod YAML with multiple containers. |
src/cri/mod.rs | Declares a stub module for future CRI functionality. |
src/task/mod.rs | Declares the task module used for pod operations. |
Files not reviewed (1)
- project/rkl/config.json: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缺少 README.md
介绍如何构建和测试
project/rkl/container_task.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起来这个是一个测试文件,你需要一个 tests 的目录来存放测试用的文件。
测试文件的命名需要跟测试的目标一致,从 container_task.yaml
container_task1.yaml
是看不出来这个测试任务的内容
project/rkl/config.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件是启动必须的么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前是必须的。
目前启动pause容器需要手动提供pause容器的bundle和config.json文件。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那你在工程里面要有一个目录叫 pause ,里面放对应的内容,不是放在项目的根目录下
Signed-off-by: ichAB <[email protected]>
Signed-off-by: ichAB <[email protected]>
1.编写了简单的 YAML 解析功能以及命令行功能
2.实现了 Pod 的概念,可以利用 Pause 容器处理容器的 Namespace
3.调用Youki Library ,创建、启动、删除Pod,查看Pod的状态
Link #20