From 60809a9a3240109607f40f544badb77aba8e89cb Mon Sep 17 00:00:00 2001 From: durant <826035498@qq.com> Date: Fri, 14 Jun 2024 15:09:17 +0800 Subject: [PATCH] feat(other): release v1.4.0 #4936 --- dbm-ui/backend/core/storages/handlers.py | 2 +- dbm-ui/backend/db_monitor/views/policy.py | 8 +++++++- dbm-ui/backend/env/bkrepo.py | 3 ++- helm-charts/bk-dbm/Chart.yaml | 4 ++-- helm-charts/bk-dbm/charts/dbm/Chart.yaml | 2 +- .../templates/configmaps/dbsimulation-configmap.yaml | 4 ++-- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dbm-ui/backend/core/storages/handlers.py b/dbm-ui/backend/core/storages/handlers.py index d02e38aab8..1f4cfa8b3b 100644 --- a/dbm-ui/backend/core/storages/handlers.py +++ b/dbm-ui/backend/core/storages/handlers.py @@ -106,7 +106,7 @@ def create_bkrepo_access_token(self, path: str): data = self.storage.client.create_bkrepo_access_token(paths=[path], expire_time=expire_time, permits=permits) return { "token": data[0]["token"], - "url": env.BKREPO_ENDPOINT_URL, + "url": env.BKREPO_FRONTEND_URL, "project": env.BKREPO_PROJECT, "repo": env.BKREPO_BUCKET, "path": path, diff --git a/dbm-ui/backend/db_monitor/views/policy.py b/dbm-ui/backend/db_monitor/views/policy.py index 41ceb7d887..6890cb33f6 100644 --- a/dbm-ui/backend/db_monitor/views/policy.py +++ b/dbm-ui/backend/db_monitor/views/policy.py @@ -17,6 +17,7 @@ from django_filters import rest_framework as filters from rest_framework import status from rest_framework.decorators import action +from rest_framework.permissions import AllowAny from rest_framework.response import Response from backend.bk_web.swagger import common_swagger_auto_schema @@ -292,7 +293,12 @@ def db_module_list(self, request, *args, **kwargs): tags=[constants.SWAGGER_TAG], request_body=serializers.AlarmCallBackDataSerializer, ) - @action(methods=["POST"], detail=False, serializer_class=serializers.AlarmCallBackDataSerializer) + @action( + methods=["POST"], + detail=False, + serializer_class=serializers.AlarmCallBackDataSerializer, + permission_classes=[AllowAny], + ) def callback(self, request, *args, **kwargs): # 监控回调需要使用 Bearer Token 进行验证 # 从请求头中获取 Authorization 头 diff --git a/dbm-ui/backend/env/bkrepo.py b/dbm-ui/backend/env/bkrepo.py index 0855979ef3..172731e6a5 100644 --- a/dbm-ui/backend/env/bkrepo.py +++ b/dbm-ui/backend/env/bkrepo.py @@ -19,8 +19,9 @@ BKREPO_PROJECT = get_type_env(key="BKREPO_PROJECT", _type=str) # 默认文件存放仓库 BKREPO_BUCKET = get_type_env(key="BKREPO_PUBLIC_BUCKET", _type=str) -# 对象存储平台域名 +# 对象存储平台后端地址 BKREPO_ENDPOINT_URL = get_type_env(key="BKREPO_ENDPOINT_URL", _type=str) +BKREPO_FRONTEND_URL = get_type_env(key="BKREPO_FRONTEND_URL", _type=str, default=BKREPO_ENDPOINT_URL) # 备份系统相关系统变量 IBS_INFO_URL = get_type_env(key="IBS_INFO_URL", _type=str) IBS_INFO_KEY = get_type_env(key="IBS_INFO_KEY", _type=str) diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index 4114bb24b3..76db97e57f 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -79,5 +79,5 @@ dependencies: description: A Helm chart for bk-dbm name: bk-dbm type: application -version: 1.4.0-alpha.57 -appVersion: 1.4.0-alpha.57 +version: 1.4.0-alpha.58 +appVersion: 1.4.0-alpha.58 diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index 25e26475fe..0e4ddcfc2c 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.4.0-alpha.913 +appVersion: 1.4.0-alpha.919 description: A Helm chart for dbm name: dbm type: application diff --git a/helm-charts/bk-dbm/templates/configmaps/dbsimulation-configmap.yaml b/helm-charts/bk-dbm/templates/configmaps/dbsimulation-configmap.yaml index b0ccab1aeb..4447607c27 100644 --- a/helm-charts/bk-dbm/templates/configmaps/dbsimulation-configmap.yaml +++ b/helm-charts/bk-dbm/templates/configmaps/dbsimulation-configmap.yaml @@ -16,13 +16,13 @@ data: spiderRulePath: "spider_rule.yaml" {{- if index .Values "db-simulation" "simulationNodeLables" }} - simulationNodeLables: "{{ index .Values "db-simulation" "simulationNodeLables" }}" + simulationNodeLables: - key: "{{ index .Values "db-simulation" "simulationNodeLables" "key" }}" value: "{{ index .Values "db-simulation" "simulationNodeLables" "value" }}" {{- end }} {{- if index .Values "db-simulation" "simulationtaintLables" }} - simulationtaintLables:: "{{ index .Values "db-simulation" "simulationtaintLables" }}" + simulationtaintLables: - key: "{{ index .Values "db-simulation" "simulationtaintLables" "key" }}" value: "{{ index .Values "db-simulation" "simulationtaintLables" "value" }}" {{- end }}