-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
29 lines (27 loc) · 1.24 KB
/
example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
apiVersion: api.practice.com/v1alpha1
kind: DbConfig
metadata:
name: mydbconfig-2
spec:
dsn: root:123456@tcp(127.0.0.1:3306)/ # db 连接的 <user>:<password>@tcp(<ip:port>)/
maxIdleConn: 15 # 最大空闲连接数,可不填,默认为 10
maxOpenConn: 100 # 最大连接数,可不填,默认为 100
services:
- user: dbconfig_servicetest1 # 用户名
password:
secretRef: dbconfig-service1-secret # secret 名,设置 db 用户的密码,用户需要先创建 secret 资源,并在此指定
dbname: dbconfig_servicetest1 # db 名
tables:
configMapRef: dbconfig-service1-configmap # configmap 名,设置创建表,用户需要先创建 configmap 资源,并在此指定
- user: dbconfig_service22test
password:
secretRef: dbconfig-service2-secret
dbname: dbconfig_service22test
tables:
configMapRef: dbconfig-service2-configmap
- user: dbconfig_service33tttt
password:
secretRef: dbconfig-service3-secret
dbname: dbconfig_service33tttt
tables:
configMapRef: dbconfig-service3-configmap