Skip to content
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

slz -> bkapp_module(entities) -> bkapp_module(db) -> crd.bkapp #1513

Merged
merged 8 commits into from
Aug 14, 2024

Conversation

jamesgetx
Copy link
Collaborator

@jamesgetx jamesgetx commented Aug 2, 2024

111

主要改动点:

  • 将 apiserver 中的模型资源定义统一抽到 bkapp_model/entities 下面, 将 slz 统一抽到 bkapp_model/serializers 下面
  • bkapp_model/importer 模块拆分成 bkapp_model/importer.py + bkapp_model/syncer 模块
  • apiserver 中除了 manifest.py 组装 bkapp(crd) 时单向依赖 bkapp(crd), 其他模块解耦对 bkapp(crd) 的直接依赖
  • declarative 模块中,校验输入模型部分,复用 bkapp_model/serializers 对应的 slz
  • camel -> snake 通过 slz 中的 source 字段解决,snake -> camel 定义了 dict_to_camel 函数

@piglei piglei merged commit 9358202 into TencentBlueKing:main Aug 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants