Skip to content

Commit c15ca74

Browse files
authored
doc: update ctrlmesh sample doc (#425)
update ctrlmesh sample doc
1 parent bfd04da commit c15ca74

File tree

2 files changed

+22
-6
lines changed
  • docs/ctrlmesh/started
  • versioned_docs/version-v0.10/ctrlmesh/started

2 files changed

+22
-6
lines changed

docs/ctrlmesh/started/try.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $ kubectl logs kusionstack-sample-operator-v0-66f7595c7b-wxwtv -n kusionstack-sa
9090
I0110 09:32:50.950535 1 runner.go:101] hold namespaces [ctrlmesh default foo-01 foo-02 foo-03 foo-04 foo-05 foo-06 foo-07 foo-08 foo-09 foo-10 foo-11 foo-12 foo-13 foo-14 foo-15 foo-16 foo-17 foo-18 foo-19 foo-20 foo-21 foo-22 foo-23 foo-24 foo-25 foo-26 foo-27 foo-28 foo-29 foo-30 foo-31 foo-32 kusionstack-sample kusionstack-system local-path-storage]
9191

9292
# Apply sample ShardingConfigs
93-
./bin/kustomize build config/shardingconfig/canary | kubectl apply -f -
93+
$ ./bin/kustomize build config/shardingconfig/canary | kubectl apply -f -
9494
shardingconfig.ctrlmesh.kusionstack.io/kusionstack-sample-operator-0-canary created
9595
shardingconfig.ctrlmesh.kusionstack.io/kusionstack-sample-operator-1-normal created
9696
```
@@ -132,7 +132,7 @@ NAME HOLDER
132132
sample-operator-leader---kusionstack-sample-operator-1-normal kusionstack-sample-operator-v0-6944bb4bf5-lfwdb_497a7962-a5f1-465e-b8ef-6e35660c63f4 32s
133133

134134
# Namespaces [foo-1, foo-2, foo-3] are no longer under v0 control.
135-
$ kubectl logs kusionstack-sample-operator-v0-6944bb4bf5-lfwdb -c manager | grep "namespaces"
135+
$ kubectl logs kusionstack-sample-operator-v0-6944bb4bf5-lfwdb -c manager -n kusionstack-sample | grep "namespaces"
136136
... hold namespaces [default foo-04 foo-05 ... foo-32]
137137

138138
```
@@ -165,7 +165,7 @@ foo-01 Active 4m
165165
foo-02 Active 4m
166166
foo-03 Active 4m
167167

168-
$ kubectl logs kusionstack-sample-operator-v1-7b6bbb49c8-qbzjj -c manager | grep namespaces
168+
$ kubectl logs kusionstack-sample-operator-v1-7b6bbb49c8-qbzjj -c manager -c kusionstack-sample| grep namespaces
169169
... hold namespaces [foo-01 foo-02 foo-03]
170170
```
171171
Similarly, if you want to have more shards, you need to do the following steps:
@@ -174,6 +174,14 @@ Similarly, if you want to have more shards, you need to do the following steps:
174174
3. Recreate or restart the existing pods to make the new ShardingConfig take effect.
175175
4. Scale out the Pods for the new ShardingConfig.
176176

177+
178+
### Clear sample resources
179+
180+
```bash
181+
$ chmod +x ./scripts/clear.sh && ./scripts/clear.sh
182+
```
183+
184+
177185
:::tip
178186
**Beta**: *We try to support automatic sharding strategy. With automatic sharding configuration, there is no need to manually configure each shard's configuration. It manages multiple sub-shardingconfigs automatically through a root configuration.*
179187
:::

versioned_docs/version-v0.10/ctrlmesh/started/try.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $ kubectl logs kusionstack-sample-operator-v0-66f7595c7b-wxwtv -n kusionstack-sa
9090
I0110 09:32:50.950535 1 runner.go:101] hold namespaces [ctrlmesh default foo-01 foo-02 foo-03 foo-04 foo-05 foo-06 foo-07 foo-08 foo-09 foo-10 foo-11 foo-12 foo-13 foo-14 foo-15 foo-16 foo-17 foo-18 foo-19 foo-20 foo-21 foo-22 foo-23 foo-24 foo-25 foo-26 foo-27 foo-28 foo-29 foo-30 foo-31 foo-32 kusionstack-sample kusionstack-system local-path-storage]
9191

9292
# Apply sample ShardingConfigs
93-
./bin/kustomize build config/shardingconfig/canary | kubectl apply -f -
93+
$ ./bin/kustomize build config/shardingconfig/canary | kubectl apply -f -
9494
shardingconfig.ctrlmesh.kusionstack.io/kusionstack-sample-operator-0-canary created
9595
shardingconfig.ctrlmesh.kusionstack.io/kusionstack-sample-operator-1-normal created
9696
```
@@ -132,7 +132,7 @@ NAME HOLDER
132132
sample-operator-leader---kusionstack-sample-operator-1-normal kusionstack-sample-operator-v0-6944bb4bf5-lfwdb_497a7962-a5f1-465e-b8ef-6e35660c63f4 32s
133133

134134
# Namespaces [foo-1, foo-2, foo-3] are no longer under v0 control.
135-
$ kubectl logs kusionstack-sample-operator-v0-6944bb4bf5-lfwdb -c manager | grep "namespaces"
135+
$ kubectl logs kusionstack-sample-operator-v0-6944bb4bf5-lfwdb -c manager -n kusionstack-sample | grep "namespaces"
136136
... hold namespaces [default foo-04 foo-05 ... foo-32]
137137

138138
```
@@ -165,7 +165,7 @@ foo-01 Active 4m
165165
foo-02 Active 4m
166166
foo-03 Active 4m
167167

168-
$ kubectl logs kusionstack-sample-operator-v1-7b6bbb49c8-qbzjj -c manager | grep namespaces
168+
$ kubectl logs kusionstack-sample-operator-v1-7b6bbb49c8-qbzjj -c manager -c kusionstack-sample| grep namespaces
169169
... hold namespaces [foo-01 foo-02 foo-03]
170170
```
171171
Similarly, if you want to have more shards, you need to do the following steps:
@@ -174,6 +174,14 @@ Similarly, if you want to have more shards, you need to do the following steps:
174174
3. Recreate or restart the existing pods to make the new ShardingConfig take effect.
175175
4. Scale out the Pods for the new ShardingConfig.
176176

177+
178+
### Clear sample resources
179+
180+
```bash
181+
$ chmod +x ./scripts/clear.sh && ./scripts/clear.sh
182+
```
183+
184+
177185
:::tip
178186
**Beta**: *We try to support automatic sharding strategy. With automatic sharding configuration, there is no need to manually configure each shard's configuration. It manages multiple sub-shardingconfigs automatically through a root configuration.*
179187
:::

0 commit comments

Comments
 (0)