From cbcaaebf0588aa657b61839783521b66b7d2afdf Mon Sep 17 00:00:00 2001 From: xiaog Date: Thu, 29 Aug 2024 14:32:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(mysql):=20=E4=BF=AE=E5=A4=8D=20rotatebinlog?= =?UTF-8?q?=20=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98=20#6524?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/000013_kafka_data.up.sql | 41 +++++++++++++++++++ .../000016_RedisInstance_data.up.sql | 6 +-- .../000026_TwemproxyRedisInstance_data.up.sql | 6 +-- .../000039_PredixyRedisCluster_data.up.sql | 6 +-- .../simpleconfig/config_item_format.go | 9 ++-- .../db-config/pkg/validate/check_value.go | 7 +++- 6 files changed, 61 insertions(+), 14 deletions(-) diff --git a/dbm-services/common/db-config/assets/migrations/000013_kafka_data.up.sql b/dbm-services/common/db-config/assets/migrations/000013_kafka_data.up.sql index 3b47f4d262..836c1654f1 100644 --- a/dbm-services/common/db-config/assets/migrations/000013_kafka_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000013_kafka_data.up.sql @@ -67,14 +67,55 @@ INSERT INTO `tb_config_file_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` -- WHERE: namespace='kafka' AND (flag_encrypt!=1 or value_default like '{{%') INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18037,'kafka','dbconf','0.10.2','adminUser','STRING','kafka','NULL','',1,0,0,0,1,'kafka','NULL',NULL,-1,NULL,'kafka配置','2022-09-20 15:28:01','2022-11-18 11:30:20',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24493,'kafka','dbconf','0.10.2','advertised.listeners','STRING','PLAINTEXT://{{.Listeners}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for advertised.listeners','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24480,'kafka','dbconf','0.10.2','auto.create.topics.enable','STRING','true',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for auto.create.topics.enable','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24479,'kafka','dbconf','0.10.2','auto.leader.rebalance.enable','STRING','true',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for auto.leader.rebalance.enable','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24468,'kafka','dbconf','0.10.2','default.replication.factor','STRING','{{.DefaultReplicationFactor}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for default.replication.factor','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24478,'kafka','dbconf','0.10.2','delete.topic.enable','STRING','true',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for delete.topic.enable','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18038,'kafka','dbconf','0.10.2','factor','STRING','3','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-11-24 11:46:20','2022-11-24 11:46:20',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24496,'kafka','dbconf','0.10.2','fetch.message.max.bytes','STRING','1073741824',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for fetch.message.max.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24474,'kafka','dbconf','0.10.2','group.initial.rebalance.delay.ms','STRING','3000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for group.initial.rebalance.delay.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24502,'kafka','dbconf','0.10.2','inter.broker.protocol.version','STRING','0.10.2.1',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for inter.broker.protocol.version','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18039,'kafka','dbconf','0.10.2','jmx_port','INT','9999',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,'kafka配置','2023-03-06 01:12:50','2023-03-06 11:27:24',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24498,'kafka','dbconf','0.10.2','leader.imbalance.check.interval.seconds','STRING','300',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for leader.imbalance.check.interval.seconds','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24497,'kafka','dbconf','0.10.2','leader.imbalance.per.broker.percentage','STRING','10',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for leader.imbalance.per.broker.percentage','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24492,'kafka','dbconf','0.10.2','listeners','STRING','PLAINTEXT://{{.Listeners}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for listeners','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24486,'kafka','dbconf','0.10.2','log.cleanup.policy','STRING','delete',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.cleanup.policy','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24491,'kafka','dbconf','0.10.2','log.dirs','STRING','{{.LogDirs}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.dirs','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24484,'kafka','dbconf','0.10.2','log.flush.interval.messages','STRING','500000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.flush.interval.messages','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24485,'kafka','dbconf','0.10.2','log.flush.interval.ms','STRING','2000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.flush.interval.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24503,'kafka','dbconf','0.10.2','log.message.format.version','STRING','0.10.2.1',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.message.format.version','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24499,'kafka','dbconf','0.10.2','log.message.timestamp.type','STRING','LogAppendTime',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.message.timestamp.type','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24467,'kafka','dbconf','0.10.2','log.retention.bytes','STRING','{{.LogRetentionBytes}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.retention.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24488,'kafka','dbconf','0.10.2','log.retention.check.interval.ms','STRING','300000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.retention.check.interval.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24466,'kafka','dbconf','0.10.2','log.retention.hours','STRING','{{.LogRetentionHours}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.retention.hours','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24487,'kafka','dbconf','0.10.2','log.segment.bytes','STRING','1073741824',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for log.segment.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24464,'kafka','dbconf','0.10.2','message.max.bytes','STRING','104857600',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for message.max.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18040,'kafka','dbconf','0.10.2','no_security','INT','0','NULL','',1,0,0,0,1,NULL,NULL,NULL,-1,NULL,'默认0,表示开启鉴权','2023-08-31 16:21:47','2023-09-04 15:38:49',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24475,'kafka','dbconf','0.10.2','num.io.threads','STRING','{{.NumIOThreads}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for num.io.threads','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24465,'kafka','dbconf','0.10.2','num.network.threads','STRING','{{.NumNetWorkThreads}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for num.network.threads','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24469,'kafka','dbconf','0.10.2','num.partitions','STRING','{{.NumPartitions}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for num.partitions','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24470,'kafka','dbconf','0.10.2','num.recovery.threads.per.data.dir','STRING','4',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for num.recovery.threads.per.data.dir','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24476,'kafka','dbconf','0.10.2','num.replica.fetchers','STRING','{{.NumReplicaFetchers}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for num.replica.fetchers','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24504,'kafka','dbconf','0.10.2','offsets.retention.minutes','STRING','20160',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for offsets.retention.minutes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24471,'kafka','dbconf','0.10.2','offsets.topic.replication.factor','STRING','{{.DefaultReplicationFactor}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for offsets.topic.replication.factor','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18041,'kafka','dbconf','0.10.2','partition_num','STRING','1','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-10-10 15:54:23','2022-11-18 11:30:20',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18043,'kafka','dbconf','0.10.2','port','STRING','9092','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-10-08 15:26:51','2022-11-18 11:30:20',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24495,'kafka','dbconf','0.10.2','replica.fetch.max.bytes','STRING','1073741824',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for replica.fetch.max.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24501,'kafka','dbconf','0.10.2','replica.fetch.wait.max.ms','STRING','5000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for replica.fetch.wait.max.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24500,'kafka','dbconf','0.10.2','replica.lag.time.max.ms','STRING','30000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for replica.lag.time.max.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18044,'kafka','dbconf','0.10.2','replication_num','STRING','1','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-10-10 15:54:23','2022-11-18 11:30:20',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18045,'kafka','dbconf','0.10.2','retention_hours','STRING','1','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-10-10 15:54:23','2022-11-18 11:30:20',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24482,'kafka','dbconf','0.10.2','socket.receive.buffer.bytes','STRING','67108864',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for socket.receive.buffer.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24483,'kafka','dbconf','0.10.2','socket.request.max.bytes','STRING','104857600',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for socket.request.max.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24481,'kafka','dbconf','0.10.2','socket.send.buffer.bytes','STRING','67108864',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for socket.send.buffer.bytes','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24473,'kafka','dbconf','0.10.2','transaction.state.log.min.isr','STRING','{{.DefaultReplicationFactor}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for transaction.state.log.min.isr','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24472,'kafka','dbconf','0.10.2','transaction.state.log.replication.factor','STRING','{{.DefaultReplicationFactor}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for transaction.state.log.replication.factor','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24477,'kafka','dbconf','0.10.2','unclean.leader.election.enable','STRING','true',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for unclean.leader.election.enable','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18046,'kafka','dbconf','0.10.2','username','STRING','kafka','NULL','',1,0,0,0,1,NULL,'NULL','NULL',-1,'NULL','kafka配置','2022-12-01 11:01:43','2022-12-01 11:01:43',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24494,'kafka','dbconf','0.10.2','zookeeper.connect','STRING','{{.ZookeeperConnect}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for zookeeper.connect','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24489,'kafka','dbconf','0.10.2','zookeeper.connection.timeout.ms','STRING','6000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for zookeeper.connection.timeout.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (24490,'kafka','dbconf','0.10.2','zookeeper.session.timeout.ms','STRING','6000',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'0.10.2','Kafka configuration for zookeeper.session.timeout.ms','2024-08-27 16:00:07','2024-08-27 16:00:07',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (18047,'kafka','dbconf','0.10.2','zookeeper_conf','STRING','1','NULL','',1,0,0,0,1,'NULL','NULL','NULL',-1,'NULL','kafka配置','2022-11-14 17:41:55','2022-11-18 11:30:20',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23913,'kafka','dbconf','1.1.1','advertised.listeners','STRING','SASL_PLAINTEXT://{{.Listeners}}',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'1.1.1','Kafka configuration for advertised.listeners','2024-08-01 21:06:48','2024-08-01 21:06:48',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (23901,'kafka','dbconf','1.1.1','auto.create.topics.enable','STRING','true',NULL,'',1,0,0,0,1,NULL,NULL,NULL,-1,'1.1.1','Kafka configuration for auto.create.topics.enable','2024-08-01 21:06:48','2024-08-01 21:06:48',0); diff --git a/dbm-services/common/db-config/assets/migrations/000016_RedisInstance_data.up.sql b/dbm-services/common/db-config/assets/migrations/000016_RedisInstance_data.up.sql index c31af5620b..896ccb586c 100644 --- a/dbm-services/common/db-config/assets/migrations/000016_RedisInstance_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000016_RedisInstance_data.up.sql @@ -525,9 +525,9 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21618,'RedisInstance','dbconf','Redis-7','dir','STRING','{{redis_data_dir}}/data','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21690,'RedisInstance','dbconf','Redis-7','disable-thp','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21651,'RedisInstance','dbconf','Redis-7','dynamic-hz','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21707,'RedisInstance','dbconf','Redis-7','enable-debug-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21708,'RedisInstance','dbconf','Redis-7','enable-module-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21706,'RedisInstance','dbconf','Redis-7','enable-protected-configs','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21707,'RedisInstance','dbconf','Redis-7','enable-debug-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-08-29 12:00:56',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21708,'RedisInstance','dbconf','Redis-7','enable-module-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-08-29 12:00:16',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21706,'RedisInstance','dbconf','Redis-7','enable-protected-configs','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-08-29 12:00:56',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21679,'RedisInstance','dbconf','Redis-7','hash-max-ziplist-entries','INT','512','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21680,'RedisInstance','dbconf','Redis-7','hash-max-ziplist-value','INT','64','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21684,'RedisInstance','dbconf','Redis-7','hll-sparse-max-bytes','INT','3000','[0,15000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:49:35','2024-01-18 15:49:35',0); diff --git a/dbm-services/common/db-config/assets/migrations/000026_TwemproxyRedisInstance_data.up.sql b/dbm-services/common/db-config/assets/migrations/000026_TwemproxyRedisInstance_data.up.sql index c1c7dec8c9..8fab214102 100644 --- a/dbm-services/common/db-config/assets/migrations/000026_TwemproxyRedisInstance_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000026_TwemproxyRedisInstance_data.up.sql @@ -545,9 +545,9 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19818,'TwemproxyRedisInstance','dbconf','Redis-7','dir','STRING','{{redis_data_dir}}/data','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:24','2023-11-27 20:03:24',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19889,'TwemproxyRedisInstance','dbconf','Redis-7','disable-thp','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19851,'TwemproxyRedisInstance','dbconf','Redis-7','dynamic-hz','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:24','2023-11-27 20:03:24',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19906,'TwemproxyRedisInstance','dbconf','Redis-7','enable-debug-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19907,'TwemproxyRedisInstance','dbconf','Redis-7','enable-module-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19905,'TwemproxyRedisInstance','dbconf','Redis-7','enable-protected-configs','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19906,'TwemproxyRedisInstance','dbconf','Redis-7','enable-debug-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2024-08-29 12:00:56',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19907,'TwemproxyRedisInstance','dbconf','Redis-7','enable-module-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2024-08-29 12:00:16',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19905,'TwemproxyRedisInstance','dbconf','Redis-7','enable-protected-configs','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2024-08-29 12:00:56',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19878,'TwemproxyRedisInstance','dbconf','Redis-7','hash-max-ziplist-entries','INT','512','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19879,'TwemproxyRedisInstance','dbconf','Redis-7','hash-max-ziplist-value','INT','64','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (19883,'TwemproxyRedisInstance','dbconf','Redis-7','hll-sparse-max-bytes','INT','3000','[0,15000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2023-11-27 20:03:25','2023-11-27 20:03:25',0); diff --git a/dbm-services/common/db-config/assets/migrations/000039_PredixyRedisCluster_data.up.sql b/dbm-services/common/db-config/assets/migrations/000039_PredixyRedisCluster_data.up.sql index c4df84bea2..3fabc0458d 100644 --- a/dbm-services/common/db-config/assets/migrations/000039_PredixyRedisCluster_data.up.sql +++ b/dbm-services/common/db-config/assets/migrations/000039_PredixyRedisCluster_data.up.sql @@ -349,9 +349,9 @@ INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, ` INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21084,'PredixyRedisCluster','dbconf','Redis-7','dir','STRING','{{redis_data_dir}}/data','','',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21156,'PredixyRedisCluster','dbconf','Redis-7','disable-thp','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21117,'PredixyRedisCluster','dbconf','Redis-7','dynamic-hz','STRING','yes','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21173,'PredixyRedisCluster','dbconf','Redis-7','enable-debug-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21174,'PredixyRedisCluster','dbconf','Redis-7','enable-module-command','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); -INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21172,'PredixyRedisCluster','dbconf','Redis-7','enable-protected-configs','STRING','no','yes|no','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21173,'PredixyRedisCluster','dbconf','Redis-7','enable-debug-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-08-29 12:00:56',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21174,'PredixyRedisCluster','dbconf','Redis-7','enable-module-command','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-08-29 12:00:16',0); +INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21172,'PredixyRedisCluster','dbconf','Redis-7','enable-protected-configs','STRING','local','yes|no|local','ENUM',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-08-29 12:00:56',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21145,'PredixyRedisCluster','dbconf','Redis-7','hash-max-ziplist-entries','INT','512','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21146,'PredixyRedisCluster','dbconf','Redis-7','hash-max-ziplist-value','INT','64','[1,10000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); INSERT INTO `tb_config_name_def` (`id`, `namespace`, `conf_type`, `conf_file`, `conf_name`, `value_type`, `value_default`, `value_allowed`, `value_type_sub`, `flag_status`, `flag_disable`, `flag_locked`, `flag_encrypt`, `need_restart`, `value_formula`, `extra_info`, `conf_name_lc`, `order_index`, `since_version`, `description`, `created_at`, `updated_at`, `stage`) VALUES (21150,'PredixyRedisCluster','dbconf','Redis-7','hll-sparse-max-bytes','INT','3000','[0,15000]','RANGE',1,0,0,0,0,NULL,NULL,NULL,-1,NULL,NULL,'2024-01-18 15:42:19','2024-01-18 15:42:19',0); diff --git a/dbm-services/common/db-config/internal/service/simpleconfig/config_item_format.go b/dbm-services/common/db-config/internal/service/simpleconfig/config_item_format.go index a79fc80576..951af6e7b3 100644 --- a/dbm-services/common/db-config/internal/service/simpleconfig/config_item_format.go +++ b/dbm-services/common/db-config/internal/service/simpleconfig/config_item_format.go @@ -1,17 +1,20 @@ package simpleconfig import ( + "encoding/json" + "strings" + "bk-dbconfig/internal/api" "bk-dbconfig/internal/repository/model" "bk-dbconfig/pkg/constvar" "bk-dbconfig/pkg/core/logger" "bk-dbconfig/pkg/util" "bk-dbconfig/pkg/validate" - "encoding/json" - "strings" "github.com/pkg/errors" "github.com/spf13/cast" + + "dbm-services/common/go-pubpkg/cmutil" ) // FormatConfItemForResp TODO @@ -143,7 +146,7 @@ func CastValueType(confName string, confValue string, f api.BaseConfFileDef, val } else if valueType == validate.DTypeFloat || valueType == validate.DTypeNumber { return cast.ToFloat32(confValue) } else if valueType == validate.DTypeBool { - return util.ToBoolExt(confValue) + return cmutil.ToBoolExt(confValue) } else if valueType == validate.DTypeString { if valueSubType == validate.DTypeSubList { newValue := util.SplitAnyRuneTrim(confValue, ",") diff --git a/dbm-services/common/db-config/pkg/validate/check_value.go b/dbm-services/common/db-config/pkg/validate/check_value.go index 4af492b28b..d763e245d7 100644 --- a/dbm-services/common/db-config/pkg/validate/check_value.go +++ b/dbm-services/common/db-config/pkg/validate/check_value.go @@ -1,19 +1,22 @@ package validate import ( - "bk-dbconfig/pkg/util" "encoding/json" "fmt" "regexp" "strconv" "strings" + "bk-dbconfig/pkg/util" + "github.com/go-playground/locales/en" ut "github.com/go-playground/universal-translator" "github.com/go-playground/validator/v10" en_translations "github.com/go-playground/validator/v10/translations/en" "github.com/pkg/errors" "github.com/spf13/cast" + + "dbm-services/common/go-pubpkg/cmutil" ) // ValueTypeDef TODO @@ -255,7 +258,7 @@ func CheckDataType(name, value string) error { return errors.Wrap(err2, err.Error()) } } else if name == DTypeBool { - if _, err := util.ToBoolExtE(value); err != nil { + if _, err := cmutil.ToBoolExtE(value); err != nil { return errors.Wrap(err2, err.Error()) } } else if name == "" {