Skip to content

Commit 017fc7a

Browse files
author
Xinkai Yi
committed
fix: 修改 resources.yaml的获取路径方式与 apigw 保持一致
1 parent 2b1c49c commit 017fc7a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bk-plugin-framework/bk_plugin_framework/services/bpf_service/management/commands/sync_apigateway_if_changed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def handle(self, *args, **options):
102102

103103
def _append_plugin_api_resource(self):
104104
"""在 resources.yaml 的 paths 节点下追加 plugin_api 资源配置"""
105-
filepath = "/app/bk_plugin_runtime/resources.yaml"
105+
filepath = os.path.join(settings.BASE_DIR, "resources.yaml")
106106
if not os.path.exists(filepath):
107107
self.stdout.write(self.style.WARNING(f"[Sync] {filepath} not found, skip appending plugin_api"))
108108
return
@@ -175,7 +175,7 @@ def _print_yaml_content(self, filepath, name):
175175

176176
def _calculate_resources_hash(self):
177177
"""计算 resources.yaml 的哈希值"""
178-
filepath = "/app/bk_plugin_runtime/resources.yaml"
178+
filepath = os.path.join(settings.BASE_DIR, "resources.yaml")
179179
if os.path.exists(filepath):
180180
with open(filepath) as f:
181181
content = f.read()

0 commit comments

Comments
 (0)