From dc96b875edcaf7002bc42108d62b317459172e11 Mon Sep 17 00:00:00 2001 From: Quyc <94251049@qq.com> Date: Tue, 1 Aug 2023 19:51:35 +0800 Subject: [PATCH] fix: K3s cluster cannot be deleted (#1364) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 曲源成 --- console/services/region_services.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/console/services/region_services.py b/console/services/region_services.py index dc3f58aae2..9350023b89 100644 --- a/console/services/region_services.py +++ b/console/services/region_services.py @@ -420,7 +420,7 @@ def create_default_region(self, enterprise_id, user): region_config = json.JSONDecoder().decode(cmd.stdout.read().decode("UTF-8")) region_info = { "region_alias": "默认集群", - "region_name": "default", + "region_name": "dind-region", "ssl_ca_cert": base64.b64decode(region_config["binaryData"]["ca.pem"]).decode("UTF-8"), "key_file": base64.b64decode(region_config["binaryData"]["client.key.pem"]).decode("UTF-8"), "cert_file": base64.b64decode(region_config["binaryData"]["client.pem"]).decode("UTF-8"), @@ -430,7 +430,8 @@ def create_default_region(self, enterprise_id, user): "tcpdomain": region_config["data"]["defaultTCPHost"], "region_id": make_uuid(), "enterprise_id": enterprise_id, - "status": "1" + "status": "1", + "desc": "该集群为平台默认集群,不可被删除", } region = region_services.add_region(region_info, user) except Exception as e: