From 285d97e75ffb065ec021f3b664c5246fa7e9b34d Mon Sep 17 00:00:00 2001 From: chenjr15 <24223746+chenjr15@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:53:07 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20v1.7.0-alpha.1=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=97=A5=E5=BF=97=20(#1188)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: v1.7.0 版本日志 * docs: v1.7.0-alpha.1 --- .../import_load_balancer_preview.md | 2 +- .../import_load_balancer_submit.md | 2 +- .../import_load_balancer_validate.md | 2 +- .../docs/biz/sync_biz_resource_by_cond.md | 2 +- .../docs/resource/sync_resource_by_cond.md | 2 +- .../docs/service/get_template_by_filename.md | 2 +- .../changelog/ch/v1.7.0_2024-11-25.md | 14 ++++ .../changelog/en/v1.7.0_2024-11-25.md | 14 ++++ docs/support-file/helm/Chart.yaml | 4 +- docs/support-file/helm/values.yaml | 2 +- scripts/sql/0028_20241128_task_management.sql | 84 +++++++++++++++++++ ...=> 0029_20241128_load_balancer_region.sql} | 48 +++++++++-- scripts/sql/9999_20240910_1700_task.sql | 84 ------------------- scripts/sql/9999_clb_optimize_index.sql | 65 -------------- scripts/sql/9999_clb_tag.sql | 35 -------- 15 files changed, 161 insertions(+), 201 deletions(-) create mode 100644 docs/support-file/changelog/ch/v1.7.0_2024-11-25.md create mode 100644 docs/support-file/changelog/en/v1.7.0_2024-11-25.md create mode 100644 scripts/sql/0028_20241128_task_management.sql rename scripts/sql/{9999_20241104_1700_load_balancer_region.sql => 0029_20241128_load_balancer_region.sql} (67%) delete mode 100644 scripts/sql/9999_20240910_1700_task.sql delete mode 100644 scripts/sql/9999_clb_optimize_index.sql delete mode 100644 scripts/sql/9999_clb_tag.sql diff --git a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_preview.md b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_preview.md index b0a2b51a0a..17300f551f 100644 --- a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_preview.md +++ b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_preview.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:负载均衡操作。 - 该接口功能描述:负载均衡excel导入,上传文件接口。 diff --git a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_submit.md b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_submit.md index c0015d4d06..b3339a2d0d 100644 --- a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_submit.md +++ b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_submit.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:负载均衡操作。 - 该接口功能描述:负载均衡excel导入,提交接口。 diff --git a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_validate.md b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_validate.md index 38b202f41c..190e955c02 100644 --- a/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_validate.md +++ b/docs/api-docs/web-server/docs/biz/load-balancer/import_load_balancer_validate.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:负载均衡操作。 - 该接口功能描述:负载均衡excel导入,校验接口。 diff --git a/docs/api-docs/web-server/docs/biz/sync_biz_resource_by_cond.md b/docs/api-docs/web-server/docs/biz/sync_biz_resource_by_cond.md index a0f9c403c2..ce21769725 100644 --- a/docs/api-docs/web-server/docs/biz/sync_biz_resource_by_cond.md +++ b/docs/api-docs/web-server/docs/biz/sync_biz_resource_by_cond.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:业务访问。 - 该接口功能描述:业务下同步指定账号下指定资源。 diff --git a/docs/api-docs/web-server/docs/resource/sync_resource_by_cond.md b/docs/api-docs/web-server/docs/resource/sync_resource_by_cond.md index 98739b66c4..056dcf52bd 100644 --- a/docs/api-docs/web-server/docs/resource/sync_resource_by_cond.md +++ b/docs/api-docs/web-server/docs/resource/sync_resource_by_cond.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:账号访问。 - 该接口功能描述:同步指定账号下指定资源。 diff --git a/docs/api-docs/web-server/docs/service/get_template_by_filename.md b/docs/api-docs/web-server/docs/service/get_template_by_filename.md index a9c37c9b0c..d6ac26e56a 100644 --- a/docs/api-docs/web-server/docs/service/get_template_by_filename.md +++ b/docs/api-docs/web-server/docs/service/get_template_by_filename.md @@ -1,6 +1,6 @@ ### 描述 -- 该接口提供版本:v9.9.9+。 +- 该接口提供版本:v1.7.0+。 - 该接口所需权限:无。 - 该接口功能描述:获取指定模板文件。 diff --git a/docs/support-file/changelog/ch/v1.7.0_2024-11-25.md b/docs/support-file/changelog/ch/v1.7.0_2024-11-25.md new file mode 100644 index 0000000000..52ee13e952 --- /dev/null +++ b/docs/support-file/changelog/ch/v1.7.0_2024-11-25.md @@ -0,0 +1,14 @@ +**V1.7.0 版本更新日志** + +# 新增 +- [新增] 腾讯云负载均衡增加单业务、单资源同步功能 +- [新增] 腾讯云负载均衡支持批量导入 +- [新增] 腾讯云负载均衡跳过传统型负载均衡监听器支持 +- [新增] 腾讯云安全组增加标签、云上创建时间、更新时间支持 +- [新增] 华为云账单支持分摊根账号支持费 +- [新增] 支持腾讯云负载均衡不同地域有相同资源id + +# 优化 +- [优化] 腾讯云负载均衡优化同步性能 + + diff --git a/docs/support-file/changelog/en/v1.7.0_2024-11-25.md b/docs/support-file/changelog/en/v1.7.0_2024-11-25.md new file mode 100644 index 0000000000..3d6e4caccb --- /dev/null +++ b/docs/support-file/changelog/en/v1.7.0_2024-11-25.md @@ -0,0 +1,14 @@ +**Version 1.7.0 Release Notes** + + +# Features +- [Feature] Added single biz and single resource synchronization feature for Tencent Cloud Load Balancer +- [Feature] Tencent Cloud Load Balancer now supports batch import +- [Feature] Tencent Cloud Load Balancer skips traditional CLB listener support +- [Feature] Added tag, cloud creation time, and update time support for Tencent Cloud Security Groups +- [Feature] Huawei Cloud Billing now supports allocation of root account support fees +- [Feature] Support for Tencent Cloud Load Balancer to have the same resource ID in different regions + +# Upgrade +- [Upgrade] Tencent Cloud Load Balancer synchronization performance optimized + diff --git a/docs/support-file/helm/Chart.yaml b/docs/support-file/helm/Chart.yaml index 76df7a3b60..97e3834118 100644 --- a/docs/support-file/helm/Chart.yaml +++ b/docs/support-file/helm/Chart.yaml @@ -2,8 +2,8 @@ name: bk-hcm apiVersion: v2 description: A full stack chart for HCM Enterprise products. type: application -version: 1.0.22 -appVersion: v1.6.11 +version: 1.0.23-alpha.1 +appVersion: v1.7.0-alpha.1 dependencies: - name: common diff --git a/docs/support-file/helm/values.yaml b/docs/support-file/helm/values.yaml index 6132dc7eaa..7f5bd7c8de 100644 --- a/docs/support-file/helm/values.yaml +++ b/docs/support-file/helm/values.yaml @@ -12,7 +12,7 @@ image: registry: hub.bktencent.com pullPolicy: IfNotPresent pullSecrets: [] - tag: 1.6.11 + tag: 1.7.0-alpha.1 serviceAccount: create: true diff --git a/scripts/sql/0028_20241128_task_management.sql b/scripts/sql/0028_20241128_task_management.sql new file mode 100644 index 0000000000..0c74541434 --- /dev/null +++ b/scripts/sql/0028_20241128_task_management.sql @@ -0,0 +1,84 @@ +/* + * TencentBlueKing is pleased to support the open source community by making + * 蓝鲸智云 - 混合云管理平台 (BlueKing - Hybrid Cloud Management System) available. + * Copyright (C) 2022 THL A29 Limited, + * a Tencent company. All rights reserved. + * Licensed under the MIT License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at http://opensource.org/licenses/MIT + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * We undertake not to change the open source license (MIT license) applicable + * + * to the current version of the project delivered to anyone in the future. + */ + +/* + SQLVER=0028,HCMVER=v1.7.0 + + Notes: + 1. 添加任务管理表task_management + 2. 添加任务详情表task_detail +*/ + +START TRANSACTION; + +-- 1. 任务管理表 +create table if not exists `task_management` +( + `id` varchar(64) not null, + `bk_biz_id` bigint not null, + `source` varchar(16) not null, + `vendors` json not null, + `state` varchar(16) not null, + `account_ids` json not null, + `resource` varchar(16) not null, + `operations` json not null, + `flow_ids` json default NULL, + `extension` json default NULL, + `creator` varchar(64) not null, + `reviser` varchar(64) not null, + `created_at` timestamp not null default current_timestamp, + `updated_at` timestamp not null default current_timestamp on update current_timestamp, + primary key (`id`), + index `idx_state` (`state`) +) engine = innodb + default charset = utf8mb4 + collate utf8mb4_bin comment ='任务管理表'; + +-- 2. 任务详情表 +create table if not exists `task_detail` +( + `id` varchar(64) not null, + `bk_biz_id` bigint not null, + `task_management_id` varchar(64) not null, + `flow_id` varchar(64) default '', + `task_action_ids` json default NULL, + `operation` varchar(64) not null, + `param` json not null, + `state` varchar(16) not null, + `reason` varchar(1024) default '', + `extension` json default NULL, + `creator` varchar(64) not null, + `reviser` varchar(64) not null, + `result` json default NULL, + `created_at` timestamp not null default current_timestamp, + `updated_at` timestamp not null default current_timestamp on update current_timestamp, + primary key (`id`), + index `idx_task_management_id` (`task_management_id`) +) engine = innodb + default charset = utf8mb4 + collate utf8mb4_bin comment ='任务详情表'; + +insert into id_generator(`resource`, `max_id`) +values ('task_management', '0'), + ('task_detail', '0'); + +CREATE OR REPLACE VIEW `hcm_version`(`hcm_ver`, `sql_ver`) AS +SELECT 'v1.7.0' as `hcm_ver`, '0028' as `sql_ver`; + +COMMIT diff --git a/scripts/sql/9999_20241104_1700_load_balancer_region.sql b/scripts/sql/0029_20241128_load_balancer_region.sql similarity index 67% rename from scripts/sql/9999_20241104_1700_load_balancer_region.sql rename to scripts/sql/0029_20241128_load_balancer_region.sql index 8ebaaa23cb..b434d9ca00 100644 --- a/scripts/sql/9999_20241104_1700_load_balancer_region.sql +++ b/scripts/sql/0029_20241128_load_balancer_region.sql @@ -18,7 +18,7 @@ */ /* - SQLVER=9999,HCMVER=v9.9.9 + SQLVER=0029,HCMVER=v1.7.0 Notes: 1. 修改负载均衡表唯一键索引为cloud_id, vendor, region @@ -36,22 +36,25 @@ START TRANSACTION; -- 1. 修改负载均衡表唯一键索引为cloud_id, vendor, region alter table load_balancer add constraint idx_uk_cloud_id_vendor_region unique (cloud_id, vendor, region); -alter table load_balancer drop key idx_uk_cloud_id_vendor; +alter table load_balancer + drop key idx_uk_cloud_id_vendor; --- 2. 负载均衡监听器表新增region字段 +-- 2. 负载均衡监听器表新增region字段, 并补充索引 (vendor, account_id, bk_biz_id, cloud_lb_id) alter table load_balancer_listener add column region varchar(20) default '' not null after `default_domain`; --- 3. 负载均衡监听器表修改唯一键索引为(cloud_id, vendor, region),并增加(lb_id,cloud_id)索引 + +-- 3. 负载均衡监听器表 修改唯一键索引为(cloud_id, vendor, region),并增加(lb_id,cloud_id)索引 alter table load_balancer_listener add constraint idx_uk_cloud_id_vendor_region unique (cloud_id, vendor, region); alter table load_balancer_listener drop key idx_uk_cloud_id_vendor; alter table load_balancer_listener add index idx_lb_id_cloud_id (lb_id, cloud_id, id); + alter table load_balancer_listener - drop index idx_lb_id; + add index idx_vendor_account_id_bk_biz_id_cloud_lb_id (vendor, account_id, bk_biz_id, cloud_lb_id); -- 4. 负载均衡目标组表修改唯一键索引为cloud_id, vendor, region alter table load_balancer_target_group @@ -59,20 +62,31 @@ alter table load_balancer_target_group alter table load_balancer_target_group drop key idx_uk_cloud_id_vendor; +alter table load_balancer_target_group + add index idx_bk_biz_id (bk_biz_id, id); + -- 5. 腾讯云URL规则表新增region字段 alter table tcloud_lb_url_rule add column region varchar(20) default '' not null after `cloud_target_group_id`; --- 6. 腾讯云URL规则表修改唯一键索引为cloud_id, vendor, region +-- 6. 腾讯云URL规则表修改唯一键索引为cloud_id, vendor, region, 增加索引(lbl_id, rule_type)、(lb_id, rule_type) alter table tcloud_lb_url_rule add constraint idx_uk_cloud_id_cloud_lbl_id_region unique (cloud_id, cloud_lbl_id, region); alter table tcloud_lb_url_rule drop key idx_uk_cloud_id_lbl_id; --- 7. 负载均衡target表新增target_group_region +alter table tcloud_lb_url_rule + add index idx_cloud_lbl_id_rule_type (lbl_id, rule_type); +alter table tcloud_lb_url_rule + add index idx_lb_id_rule_type (lb_id, rule_type); + +-- 7. 负载均衡target表新增target_group_region,并增加索引target_group_id alter table load_balancer_target add column target_group_region varchar(20) default '' not null after `inst_name`; +alter table load_balancer_target + add index idx_target_group_id (target_group_id, id); + -- 8. 负载均衡target表修改唯一键索引为cloud_target_group_id, ip, port, cloud_inst_id, target_group_region alter table load_balancer_target add constraint idx_uk_cloud_target_group_id_ip_port_target_group_region @@ -80,9 +94,27 @@ alter table load_balancer_target alter table load_balancer_target drop key idx_uk_cloud_target_group_id_ip_port_cloud_inst_id; +-- 9. 负载均衡表新增tags字段 +alter table load_balancer + add tags JSON null after cloud_expired_time; + +-- 10. 目标组规则关系表 target_group_listener_rule_rel 增加索引 +alter table target_group_listener_rule_rel + add index idx_listener_rule_id (listener_rule_id); +alter table target_group_listener_rule_rel + add index idx_lb_id_cloud_rule_id (lb_id, cloud_listener_rule_id); +alter table target_group_listener_rule_rel + add index idx_lb_id_cloud_lbl_id (lb_id, cloud_lbl_id, id); +alter table target_group_listener_rule_rel + add index idx_lbl_id (lbl_id, id); + +-- 11. audit审计表增加业务id索引 +alter table audit + add index idx_bk_biz_id (bk_biz_id, id); + CREATE OR REPLACE VIEW `hcm_version`(`hcm_ver`, `sql_ver`) AS -SELECT 'v9.9.9' as `hcm_ver`, '9999' as `sql_ver`; +SELECT 'v1.7.0' as `hcm_ver`, '0029' as `sql_ver`; COMMIT diff --git a/scripts/sql/9999_20240910_1700_task.sql b/scripts/sql/9999_20240910_1700_task.sql deleted file mode 100644 index a6768bd0f4..0000000000 --- a/scripts/sql/9999_20240910_1700_task.sql +++ /dev/null @@ -1,84 +0,0 @@ -/* - * TencentBlueKing is pleased to support the open source community by making - * 蓝鲸智云 - 混合云管理平台 (BlueKing - Hybrid Cloud Management System) available. - * Copyright (C) 2022 THL A29 Limited, - * a Tencent company. All rights reserved. - * Licensed under the MIT License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://opensource.org/licenses/MIT - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * We undertake not to change the open source license (MIT license) applicable - * - * to the current version of the project delivered to anyone in the future. - */ - -/* - SQLVER=9999,HCMVER=v9.9.9 - - Notes: - 1. 添加任务管理表task_management - 2. 添加任务详情表task_detail -*/ - -START TRANSACTION; - --- 1. 任务管理表 -create table if not exists `task_management` -( - `id` varchar(64) not null, - `bk_biz_id` bigint not null, - `source` varchar(16) not null, - `vendors` json not null, - `state` varchar(16) not null, - `account_ids` json not null, - `resource` varchar(16) not null, - `operations` json not null, - `flow_ids` json default NULL, - `extension` json default NULL, - `creator` varchar(64) not null, - `reviser` varchar(64) not null, - `created_at` timestamp not null default current_timestamp, - `updated_at` timestamp not null default current_timestamp on update current_timestamp, - primary key (`id`), - index `idx_state` (`state`) - ) engine = innodb - default charset = utf8mb4 - collate utf8mb4_bin comment ='任务管理表'; - --- 2. 任务详情表 -create table if not exists `task_detail` -( - `id` varchar(64) not null, - `bk_biz_id` bigint not null, - `task_management_id` varchar(64) not null, - `flow_id` varchar(64) default '', - `task_action_ids` json default NULL, - `operation` varchar(64) not null, - `param` json not null, - `state` varchar(16) not null, - `reason` varchar(1024) default '', - `extension` json default NULL, - `creator` varchar(64) not null, - `reviser` varchar(64) not null, - `result` json default NULL, - `created_at` timestamp not null default current_timestamp, - `updated_at` timestamp not null default current_timestamp on update current_timestamp, - primary key (`id`), - index `idx_task_management_id` (`task_management_id`) - ) engine = innodb - default charset = utf8mb4 - collate utf8mb4_bin comment ='任务详情表'; - -insert into id_generator(`resource`, `max_id`) -values ('task_management', '0'), - ('task_detail', '0'); - -CREATE OR REPLACE VIEW `hcm_version`(`hcm_ver`, `sql_ver`) AS -SELECT 'v9.9.9' as `hcm_ver`, '9999' as `sql_ver`; - -COMMIT diff --git a/scripts/sql/9999_clb_optimize_index.sql b/scripts/sql/9999_clb_optimize_index.sql deleted file mode 100644 index 5976e1aaa5..0000000000 --- a/scripts/sql/9999_clb_optimize_index.sql +++ /dev/null @@ -1,65 +0,0 @@ -/* - * TencentBlueKing is pleased to support the open source community by making - * 蓝鲸智云 - 混合云管理平台 (BlueKing - Hybrid Cloud Management System) available. - * Copyright (C) 2024 THL A29 Limited, - * a Tencent company. All rights reserved. - * Licensed under the MIT License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://opensource.org/licenses/MIT - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * We undertake not to change the open source license (MIT license) applicable - * - * to the current version of the project delivered to anyone in the future. - */ - - -/* - SQLVER=9999,HCMVER=v9.9.9 - - Notes: - 1. clb优化索引 -*/ - -START TRANSACTION; - --- tcloud_lb_url_rule -alter table tcloud_lb_url_rule - add index idx_cloud_lbl_id_rule_type (cloud_lbl_id, rule_type); -alter table tcloud_lb_url_rule - add index idx_lb_id_rule_type (lb_id, rule_type); - --- load_balancer_target -alter table load_balancer_target - add index idx_target_group_id (target_group_id); - --- target_group_listener_rule_rel -alter table target_group_listener_rule_rel - add index idx_listener_rule_id (listener_rule_id); -alter table target_group_listener_rule_rel - add index idx_lb_id_cloud_rule_id (lb_id, cloud_listener_rule_id); -alter table target_group_listener_rule_rel - add index idx_lb_id_cloud_lbl_id (lb_id, cloud_lbl_id); -alter table target_group_listener_rule_rel - add index idx_lbl_id (lbl_id); - --- load_balancer_listener -alter table load_balancer_listener - add index idx_vendor_account_id_bk_biz_id_cloud_lb_id (vendor, account_id, bk_biz_id, cloud_lb_id); - --- load_balancer_target_group -alter table load_balancer_target_group - add index idx_bk_biz_id (bk_biz_id); - --- audit -alter table audit - add index idx_bk_biz_id (bk_biz_id); - -CREATE OR REPLACE VIEW `hcm_version`(`hcm_ver`, `sql_ver`) AS -SELECT 'v9.9.9' as `hcm_ver`, '9999' as `sql_ver`; - -COMMIT; \ No newline at end of file diff --git a/scripts/sql/9999_clb_tag.sql b/scripts/sql/9999_clb_tag.sql deleted file mode 100644 index 728917536f..0000000000 --- a/scripts/sql/9999_clb_tag.sql +++ /dev/null @@ -1,35 +0,0 @@ -/* - * TencentBlueKing is pleased to support the open source community by making - * 蓝鲸智云 - 混合云管理平台 (BlueKing - Hybrid Cloud Management System) available. - * Copyright (C) 2024 THL A29 Limited, - * a Tencent company. All rights reserved. - * Licensed under the MIT License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at http://opensource.org/licenses/MIT - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * We undertake not to change the open source license (MIT license) applicable - * - * to the current version of the project delivered to anyone in the future. - */ - -/* - SQLVER=9999,HCMVER=v9.9.9 - - Notes: - 1. load_balancer 表增加tags字段 -*/ - -START TRANSACTION; - -alter table load_balancer - add tags JSON null after cloud_expired_time; - -CREATE OR REPLACE VIEW `hcm_version`(`hcm_ver`, `sql_ver`) AS -SELECT 'v9.9.9' as `hcm_ver`, '9999' as `sql_ver`; - -COMMIT;