Skip to content

Commit

Permalink
feature: 支持 bkmonitorproxy 的资源配额设置 (closed #868)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon committed Jul 18, 2022
1 parent 9aefa03 commit 099200b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apps/node_man/handlers/plugin_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ def fetch_resource_policy(cls, bk_biz_id: int, bk_obj_id: str, bk_inst_id: int)
查询资源策略
"""
head_plugins: List[str] = tools.PluginV2Tools.fetch_head_plugins()
# 部分插件仅面向 proxy,放入 head_plugins 会导致冗余的插件进程状态同步
# 此处临时添加,继续通过 https://github.com/TencentBlueKing/bk-nodeman/issues/878 优化
extra_plugins: List[str] = list(
models.GsePluginDesc.objects.filter(name__in=["bkmonitorproxy"]).values_list("name", flat=True)
)
head_plugins = list(set(head_plugins + extra_plugins))
resource_policy_qs = models.PluginResourcePolicy.objects.filter(
bk_biz_id=bk_biz_id, bk_obj_id=bk_obj_id, bk_inst_id=bk_inst_id, plugin_name__in=head_plugins
)
Expand Down
3 changes: 3 additions & 0 deletions dev_log/2.2.18/crayon_202206281132.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
feature:
- "支持 bkmonitorproxy 的资源配额设置 (closed #868)"

0 comments on commit 099200b

Please sign in to comment.