Skip to content

Commit

Permalink
Merge pull request #3 from workhardliuzheng/main
Browse files Browse the repository at this point in the history
feature: edit config.yaml/template.yaml
  • Loading branch information
JJGGu authored Jun 14, 2024
2 parents c38f0cd + a25d318 commit 1fb69da
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
31 changes: 19 additions & 12 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,33 @@ Service:
ParameterConfigs:
- TemplateName: mysql
Parameters:
max_allowed_packet:
mysql.max_allowed_packet:
Type: String
Description: mysql服务器允许最大接收数的据包大小
Default: '16M'
ConstraintDescription: 8M~512M
max_connections:
AllowedPattern: \d+M
ConstraintDescription: 数据包大小,只允许填写数字+M,例如16M
mysql.max_connections:
Type: Number
Description: 最大连接数
Default: '512'
ConstraintDescription: 256~1024
max_user_connections:
Default: 512
MaxValue: 1024
MinValue: 256
mysql.max_user_connections:
Type: Number
Default: '48'
Default: 48
MaxValue: 64
MinValue: 32
Description: 用户最大的连接数
ConstraintDescription: 32~64
thread_cache_size:
mysql.thread_cache_size:
Type: Number
Default: '16'
Description: 线程缓存
ConstraintDescription: 8,16,32,64
AllowedValues:
- 8
- 16
- 32
- 64
Metadata:
ParameterGroups:
- Parameters:
Expand All @@ -106,11 +113,11 @@ Service:
thread_cache_size = 16
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[client]
port=3306
socket=/data1/mysql/mysql.sock
Formatter: cnf
Name: mysql
FormatterConfig:
SectionName: mysqld
StatusOperationConfigs:
Expand Down
6 changes: 3 additions & 3 deletions templates/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Resources:
spec:
containers:
- name: mysql
image: mysql:latest
image: compute-nest-registry.cn-hangzhou.cr.aliyuncs.com/bestpractice/mysql:1.0
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
Expand All @@ -119,7 +119,7 @@ Resources:
- name: mysql-config
mountPath: /etc/mysql/conf.d
- name: mysql-exporter
image: prom/mysqld-exporter:latest
image: compute-nest-registry.cn-hangzhou.cr.aliyuncs.com/bestpractice/mysql-export:1.0
command:
- /bin/mysqld_exporter
- --collect.info_schema.innodb_metrics
Expand Down Expand Up @@ -250,7 +250,7 @@ Resources:
ConfigParam:
Fn::Indent:
- Fn::Select:
- default
- mysql
- Ref: ConfigParam
- 2
Replicas:
Expand Down

0 comments on commit 1fb69da

Please sign in to comment.