56 Commits

Author SHA1 Message Date
DoL
ce81aa84c5
feat: 添加namespace相关api (#108) 2025-05-28 20:34:57 +08:00
308e9bcc5d
refactor: project structure and better interfaces (#100)
* refactor: basically rewrite all interface

* refactor: rename crates to make clear meaning; use tokio runtime and handle shutdown within Provider

* remove tracker in main

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(provider): enhance Provider trait with list, update, and status methods; refactor existing methods to async

* fix(containerd): fetch handle from environment and initialize it.

* fix(init): BACKEND init add handle fetching

* fix: add test framework

* fix: move the snapshot logic into snapshot.rs

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: change some spec setting

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: add created_at field, add http status code convertion

* refactor(spec): use builder to generate spec

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: clippy

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* manage reference, fix boot issue

* fix: ip parsing

* feat: add cleanup logic on fail

* fix style: clippy for return function

* feat: add response message

* fix:1.修复proxy和resolve的逻辑 2.spec内netns的路径问题以及传参顺序

* feat:add update list status  service implmentation

* fix: move some consts into consts.rs

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: fmt & clippy

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: update dependecy

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: add function with_vm_network

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: integrate cni into containerd crate

* fix:修复proxy的路径正则匹配并添加单元测试

* fix:fix proxy_path and add default namespace for Query::from

* fix: integration_test

* fix: path dispatch test

* fix: more specified url dispatch in proxy handle

* feat: add persistent container record for restart service

* feat: add task error type

* fix: delete error handle logic

---------

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>
Co-authored-by: sparkzky <sparkhhhhhhhhhh@outlook.com>
Co-authored-by: dolzhuying <1240800466@qq.com>
Co-authored-by: scutKKsix <1129332011@qq.com>
2025-05-22 21:43:16 +08:00
aLinChe
ed6741cd8a
feat(awc): introduce awc crate to match actix-web streaming requests (#94)
* feat: introduce awc crate to match actix-web streaming requests

* fix(ci): fix the integration_tests

mod

---------

Co-authored-by: Samuka007 <dailvchen@dragonos.org>
2025-05-08 15:16:12 +08:00
DoL
702e6a8596
fix(api): some api's logic and response status code (#92) 2025-05-04 13:24:00 +08:00
aLinChe
90ea45c125
feat(docs-openapi): update the docs and add openapi.yaml (#93) 2025-05-03 10:34:20 +08:00
aLinChe
674d345a9f
feat(ci): add integration_test for deploy proxy delete in namespace 'default' (#90) 2025-04-26 15:56:38 +08:00
Vitus
df96fc1688
fix(provider): adjust structure of proxy_handler (#83) 2025-04-26 12:23:56 +08:00
火花
e7fb8105b4
新增命名空间管理 (#89) 2025-04-25 14:05:43 +08:00
火花
02a0f8777a
fix(ctrd):移动cni创建逻辑到容器创建过程 (#87) 2025-04-24 20:44:07 +08:00
DoL
7cbe9361db
feat(provider): add add get_function_list to route (#77)
* feat(namespace):replace netns_map's key with (string,string) so that key (cid,ns) refers to the only net work

* fix:fix the error response in proxy_handler

* feat:add get_function_list to route

* feat:replace map's key (string,string) with struct
2025-04-24 15:12:45 +08:00
scutKKsix
9277d3ef0b fix(bug): replace unwrap() with unwrap_or_default() to propagate errors for better handling 2025-04-23 12:05:18 +08:00
火花
2f83a94476
Fix(config):添加默认cwd和ports信息 (#76)
* 添加默认cwd和ports信息

* 增加日志打印
2025-04-18 13:50:08 +08:00
火花
c4176723f3
fix(spec):生成spec的时候补充cwd信息 (#75) 2025-04-17 16:34:12 +08:00
火花
e2a95d4fed
Feat(containerd): 移动containerd的逻辑,解除耦合 (#73)
* 将containerd逻辑统一到一个地方,增加错误处理

* 修改一点逻辑

* 删除service
2025-04-17 16:13:00 +08:00
edf5d68d0a
feat(cni): add unit test for commands (#70) 2025-04-16 17:01:44 +08:00
火花
6ecde71c52
Feat(netns): 添加netns-rs来管理网络命名空间 (#69)
* 添加netns-rs来管理网络命名空间

* fix: cargo hakari generate

---------

Co-authored-by: Samuka007 <samuka007@dragonos.org>
2025-04-16 11:35:51 +08:00
8c4107a8b4 fix(log):replace all println! with log 2025-04-15 11:31:04 +08:00
a671480b6f fix:移除app/src中原本用于测试的函数 2025-04-15 11:31:04 +08:00
168b533784 fix(get_function):fix the logic of get_function in zky's branch 2025-04-15 11:31:04 +08:00
0bbb6759ce fix(bug):resolve get_runtime_config name tansferred but remaining (1.get_runtime_config structure rebuild 2.address got to be parse to get ip:port) 2025-04-15 11:31:04 +08:00
92b281dc48 feat:gateway-mvp implmentation,enable to deploy function,proxy request to the container and delete function's container and task 2025-04-15 11:31:04 +08:00
火花
7258f4f6ed
Feat(image) 移动image成为单独的逻辑 (#61)
* 更改cni的位置

* 提取关于Image的逻辑

* 更改全局ImageMap的名字

* runtime_config获取部分改为expect

* 修改save_img_config的位置

* 完善一下错误处理

* 遗漏的错误处理

* 增加deploy处的错误处理

* fmt
2025-04-14 19:36:56 +08:00
火花
f5f223db6b
feat(service): record port for access (#57) 2025-04-12 18:15:59 +08:00
DoL
1acbab92fc
feat(gateway):enable to deploy and delete function with request (#54)
* fix:move trait IAMHandler to types/

* feat:enable to resolve request and to set proxy for request

* save implementation for trait IAMHandler

* remove trait IAMHandler and add deploy and delete

* add feishu_bot.yml

* 修复一点ctr逻辑 (#29)

* 修复一点逻辑

* fmt

* feat:remove trait IAMHandler and bind fucntion to gateway

* resolve conflict in cni_network

* fix(delete): fix delete task.

* fix(clippy): fmt

* fix:remove darwin and launch.json

* fix:hakari generate

* fix: remove files and build targets

* fix: some format problems

---------

Co-authored-by: vitus213 <2811215248@qq.com>
Co-authored-by: 火花 <sparkhhhhhhhhhh@outlook.com>
Co-authored-by: scutKKsix <1129332011@qq.com>
Co-authored-by: Samuka007 <samuka007@dragonos.org>
2025-04-12 00:02:49 +08:00
eeac4b0204
fix(misc): remove vscode settings (#53)
* remove settings.json

* add gitignore for .vscode/settings.json
2025-04-11 14:43:59 +08:00
Vitus
bf9f6097c9
feat(nofity): add feishu notify (#46)
* 自己造的轮子

* feat(notify): sync notify to feishu using existing GitHub Action (#47)

* feat(notify): sync notify to feishu

* fix(notify): wrong usage of env secret

* feat(workflow): expand branch support in feishu_bot.yml for pull requests and pushes

* feat(ci): only run under source code changes

* feat(ci): add notification under workflows

* fix(notify): change action name to trigger workflow

* feat(notify): change secrets using repo secrets

* remove temporary push trigger

---------

Co-authored-by: Samuel Dai <samuka007@dragonos.org>
2025-04-08 17:33:29 +08:00
火花
eeef85dd33
feat(cni): use environment variable to config cni tools path (#41)
* 添加dotenv来设定cni插件地址

* 改用lazy_static!

* fmt

* 增加命令执行结果的判断
2025-04-08 11:04:36 +08:00
火花
0222f5988a
修改一些逻辑 (#40)
* 修改一些逻辑

* 完善错误处理

* 恢复原来的Service初始化函数
2025-04-07 20:53:31 +08:00
DoL
2f9f6c4ca9
feat(proxy): invoke functions logic(#22)
* fix:move trait IAMHandler to types/

* feat:enable to resolve request and to set proxy for request
2025-04-03 14:22:32 +08:00
1830e40326
Revert "feat(cni): refactor cni_network with RAII design (#13)" (#23)
This reverts commit d46ccf6ea77c62527df7977ec2dd5fbaad6c1245.
2025-04-03 13:59:24 +08:00
kaleidoscope416
d46ccf6ea7
feat(cni): refactor cni_network with RAII design (#13) 2025-04-01 19:20:52 +08:00
aLinChe
81a3613231
feat(provider): get information from container. (#19) 2025-03-28 20:40:49 +08:00
21e9f3cbe8 feat(misc): fix clippy misc and remove unused auth module 2025-03-28 14:32:04 +08:00
35fb4a8232 feat(ci): enable github action ci 2025-03-27 20:36:57 +08:00
3a513b525c fix(fmt & dep): clippy & hakari 2025-03-27 20:36:57 +08:00
火花
9fa472c8c6
Feat cni (#7)
* fmt

* 完善cni以及添加接口
2025-03-23 11:13:42 +08:00
火花
c33fefa635
Feat provider framework (#9)
添加了handler大概框架,具体逻辑尚未实现
2025-03-13 15:55:36 +08:00
YuLong Huang
1759d28dd0
迁移项目,完善provider的框架 (#6) 2025-03-02 16:37:46 +08:00
火花
8ec1bdb475
Merge pull request #5 from sparkzky/feat-provider
Feat provider
2025-02-28 17:42:45 +08:00
sparkzky
00422de1c5 完善大概框架 2025-02-28 17:41:35 +08:00
sparkzky
6dadc9ecf3 创建基本文件夹 2025-02-28 17:33:10 +08:00
火花
bc54e9c2d0
Merge pull request #4 from sparkzky/feat-warp-ctr
Feat warp ctr
2025-02-27 22:39:50 +08:00
sparkzky
a04fd9b185 fmt 2025-02-27 22:34:50 +08:00
sparkzky
377d649d4e 1 2025-02-27 22:26:45 +08:00
sparkzky
caa05b93fc remove container_spec.json 2025-02-27 22:00:32 +08:00
sparkzky
8cd0b937bc Merge remote-tracking branch 'origin/master' into feat-warp-ctr 2025-02-27 21:54:20 +08:00
sparkzky
eee53e6c73 1 2025-02-27 21:33:50 +08:00
sparkzky
fa084b1f23 完善对ctr的包装 2025-02-27 21:30:07 +08:00
火花
1c3a38905a
Merge pull request #3 from Samuka007/nix
Use Nix to manage develop environment and build
2025-02-26 14:26:16 +08:00
sparkzky
ab94f96457 init 2025-02-26 13:19:00 +08:00