-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] refactor config center, according the new config path key. #346
Comments
ok |
新的 config.yaml 文件内容 kind: ConfigMap
apiVersion: "1.0"
metadata:
name: arana-config
data:
listeners:
- protocol_type: mysql
server_version: 5.7.0
socket_address:
address: 0.0.0.0
port: 13306
tenants:
tenant:
- name: arana
users:
- username: arana
password: "123456"
- username: dksl
password: "123456"
clusters:
- name: employees
type: mysql
sql_max_limit: -1
tenant: arana
parameters:
max_allowed_packet: 256M
groups:
- name: employees_0000
nodes:
- node0
- node0_r_0
- name: employees_0001
nodes:
- node1
- name: employees_0002
nodes:
- node2
- name: employees_0003
nodes:
- node3
sharding_rule:
tables:
- name: employees.student
allow_full_scan: true
sequence:
type: snowflake
option:
db_rules:
- column: uid
type: scriptExpr
expr: parseInt($value % 32 / 8)
tbl_rules:
- column: uid
type: scriptExpr
expr: $value % 32
step: 32
topology:
db_pattern: employees_${0000..0003}
tbl_pattern: student_${0000..0031}
attributes:
sqlMaxLimit: -1
nodes:
- id: node0
name: node0
host: arana-mysql
port: 3306
username: root
password: "123456"
database: employees_0000
weight: r10w10
parameters:
- id: node0_r_0
name: node0_r_0
host: arana-mysql
port: 3306
username: root
password: "123456"
database: employees_0000_r
weight: r0w0
parameters:
- id: node1
name: node1
host: arana-mysql
port: 3306
username: root
password: "123456"
database: employees_0001
weight: r10w10
parameters:
- id: node2
name: node2
host: arana-mysql
port: 3306
username: root
password: "123456"
database: employees_0002
weight: r10w10
parameters:
- id: node3
name: node3
host: arana-mysql
port: 3306
username: root
password: "123456"
database: employees_0003
weight: r10w10
parameters:
|
tenants clusters nodes 是平级关系吧?这个缩进好像有问题。 |
已经不是平级的了,cluster、nodes 都是在某一个 tenant 下的资源 |
|
id 一般自动生成,name 是让用户更容易理解记住? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What would you like to be added:
Why is this needed:
rootPath
config atbootstrap.xml
&env
;version
config tobootstrap.xml
;etcd
client problem,dubbogo/gost etcd
unsuited;The new config design:
配置中心
Root
Tenants
Nodes
Data Source Clusters
Sharding Rule
The text was updated successfully, but these errors were encountered: