Skip to content

Commit

Permalink
chore(docs): update sharding docs (#341)
Browse files Browse the repository at this point in the history
Signed-off-by: wbtlb <[email protected]>

Signed-off-by: wbtlb <[email protected]>
Co-authored-by: wbtlb <[email protected]>
  • Loading branch information
wbtlb and wbtlb authored Sep 26, 2022
1 parent eaa780d commit a887c49
Showing 2 changed files with 23 additions and 24 deletions.
24 changes: 23 additions & 1 deletion docs/docs/Features/sharding.md
Original file line number Diff line number Diff line change
@@ -95,4 +95,26 @@ SELECT COUNT(price) AS AVG_DERIVED_COUNT_00000, SUM(price) AS AVG_DERIVED_SUM_00
|broadcast_tables|array[String]|||暂不支持||
|table_sharding_algorithm_name|enum|||分片算法|
|table_sharding_column|String|||分片键|
|sharding_count|u64|||分片数|
|sharding_count|u64|||分片数|

## CRD 配置示例
```yaml
apiVersion: core.database-mesh.io/v1alpha1
kind: DataShard
metadata:
name: catalogue
namespace: demotest
labels:
source: catalogue
spec:
rules:
- tableName: "t_order"
tableStrategy:
tableShardingAlgorithmName: "mod"
tableShardingColumn: "id"
shardingCount: 4
actualDatanodes:
valueSource:
nodes:
- value: "ds001"
```
23 changes: 0 additions & 23 deletions docs/docs/UseCases/kubernetes.md
Original file line number Diff line number Diff line change
@@ -237,29 +237,6 @@ spec:
db: "socksdb"
```
- DataShard
```yaml
apiVersion: core.database-mesh.io/v1alpha1
kind: DataShard
metadata:
name: catalogue
namespace: demotest
labels:
source: catalogue
spec:
rules:
- tableName: "t_order"
tableStrategy:
tableShardingAlgorithmName: "mod"
tableShardingColumn: "id"
shardingCount: 4
actualDatanodes:
valueSource:
nodes:
- value: "ds001"
```
#### 应用访问数据库切换至 Pisanix
为 namespace 添加标签以开启注入

0 comments on commit a887c49

Please sign in to comment.