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

feat(default.py): add ENABLE_MULTI_TENANT_MODE #1135

Merged

Conversation

wklken
Copy link
Collaborator

@wklken wklken commented Dec 2, 2024

Description

变更点:

  • default.py: 增加 ENABLE_MULTI_TENANT_MODE 变量,从环境变量中获取,默认False
  • 多租户模式下,所有 esb 相关的模型/url 不注册
  • 返回 feature_flag: ENABLE_MULTI_TENANT_MODE 给到前端 【用户展示差异化的开关】
  • bin脚本
    • bin/on_migrate: ENABLE_MULTI_TENANT_MODE 开启则不初始化 bk-esb
    • bin/post_migrate: ENABLE_MULTI_TENANT_MODE 开启则不初始化 bk-esb
  • 多租户模式环境默认插件: bk-tenant-verify, 否则环境默认插件: bk-default-tenant
  • 增加 EDITION 环境变量用于区分内外部版(后续逐步合并内外部版代码文件差异)
    • bk-monitor 和 bk-log 内外部版使用不同的网关名
  • 多租户版本:不再兼容非标准化调用 【直接 allow_auth_from_params 默认值强制设置为 False】
  • 多租户版本: 禁用掉免用户认证应用白名单 【直接在slz校验时强校验报错,不允许绑定该插件】
  • 多租户版本:日志增加 bk_tenant_id 字段

Checklist

  • 填写 PR 描述及相关 issue (write PR description and related issue)
  • 代码风格检查通过 (code style check passed)
  • PR 中包含单元测试 (include unit test)
  • 单元测试通过 (unit test passed)
  • 本地开发联调环境验证通过 (local development environment verification passed)

@wklken wklken requested review from Han-Ya-Jun and F-cq December 2, 2024 07:00
@wklken wklken marked this pull request as ready for review December 3, 2024 07:55
Copy link
Member

@Han-Ya-Jun Han-Ya-Jun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wklken wklken merged commit d1ea9cd into TencentBlueKing:ft_tenant Dec 5, 2024
3 checks passed
@wklken wklken deleted the ft_enable_multi_tenant_mode branch December 5, 2024 02:38
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.

2 participants