Skip to content

Commit

Permalink
fix: K3s cluster cannot be deleted (#1364)
Browse files Browse the repository at this point in the history
Co-authored-by: 曲源成 <[email protected]>
  • Loading branch information
quyuancheng and 曲源成 authored Aug 1, 2023
1 parent f28e824 commit dc96b87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions console/services/region_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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:
Expand Down

0 comments on commit dc96b87

Please sign in to comment.