bitflicker64 commented on code in PR #575:
URL: https://github.com/apache/hugegraph-doc/pull/575#discussion_r4628893511


##########
content/cn/docs/quickstart/hugegraph/hugegraph-helm.md:
##########
@@ -327,47 +330,63 @@ helm test hugegraph -n hugegraph --logs --timeout 5m
 要采用新的默认值,先审阅已有配置,再使用 `--reset-values` 和保留镜像、凭据、存储、拓扑设置的配置文件。
 PD 成员、持久存储和共享凭据变更需要按生命周期说明协调处理。
 
-基于当前 master 构建的 PD、Store 和 Server 镜像以 UID/GID `10001` 运行。除非 
`podSecurityContext` 已设置 `fsGroup`,Chart 会为 PD 和 Store Pod 设置
-`fsGroup: 10001`(以及 `fsGroupChangePolicy: OnRootMismatch`),即使 `--reuse-values` 
保留了旧 Release 的空值也是如此,使其能写入旧镜像(以 root 运行)创建的 PVC。
+### 迁移 root 属主的数据卷 {#root-owned-volume-upgrade}
 
-请在首次应用 `fsGroup` 的同一次滚动更新中,将 PD 和 Store 切换到基于此版本构建的镜像,使 kubelet 在 `10001` 
镜像启动前修改卷的属主。不要先用仍以 root
-运行的镜像(例如尚未更新到此版本的 `latest`)运行此 Chart:这些镜像创建的文件归 root 所有,而 `OnRootMismatch` 
只检查卷的根目录,之后不会再修正它们。
-请将 `pd.image` 和 `store.image` 固定为基于此版本构建的镜像,而不要依赖 `latest`。非空的 `image.digest` 
优先于 `image.tag`,且 `--reuse-values`
-会保留已有的 digest,因此按 digest 固定镜像的 Release 必须修改 digest,而不能只修改标签。
+当前 PD、Store、Server 镜像以 UID/GID `10001` 运行。除非显式覆盖,PD/Store Pod 使用 `fsGroup: 
10001`
+和 `fsGroupChangePolicy: OnRootMismatch`,复用旧空安全上下文的升级也适用。
+请在首次切换到非 root 镜像的同一次滚动更新中应用该卷属主设置。
 
-如果 Release 已在设置了 `fsGroup` 的情况下运行过 root 镜像,请在首次滚动更新到 `10001` 
镜像的同时执行一次递归属主变更。请在同一条命令中设置镜像,
-使递归变更作用于 `10001` 镜像,而不是已固定的 root 镜像。示例清空了保留下来的 digest,使标签生效;按 digest 固定镜像的 
Release 应改为将 `pd.image.digest`
-和 `store.image.digest` 设为此版本镜像的 digest:
+若中途运行 root 镜像,它创建的文件可能不会被后续
+`OnRootMismatch` 修复,因为该策略只检查卷根目录。
 
-```bash
-helm upgrade hugegraph "$CHART" --devel -n hugegraph --reuse-values \
-  --set pd.image.tag=<this-version> \
-  --set store.image.tag=<this-version> \
-  --set-string pd.image.digest= \
-  --set-string store.image.digest= \
-  --set pd.podSecurityContext.fsGroupChangePolicy=Always \
-  --set store.podSecurityContext.fsGroupChangePolicy=Always \
-  --wait --timeout 15m
-```
+固定本次非 root 构建的镜像标签或 digest,保留的 digest 优先于标签。
+若 release 已在设置 `fsGroup` 后运行过 root 镜像,按以下顺序执行一次性修复:
 
-改回原策略前,请确认每个 PD 和 Store Pod 运行的都是你设置的 `10001` 镜像,而不是旧的 root 镜像:
+1. **发布非 root 镜像,同时执行递归属主修复。**
 
-```bash
-kubectl get pods -n hugegraph \
-  -o jsonpath='{range 
.items[*]}{.metadata.name}{"\t"}{.spec.containers[*].image}{"\n"}{end}'
-```
+   将 `<this-version>` 替换为审阅后的非 root 构建。示例清空旧 digest 以使用标签;
+   按 digest 固定的部署应改为设置新构建的对应 digest。
 
-`--reuse-values` 会保留 `Always`,而它会在每次 Pod 启动时遍历整个卷,因此请在这些 Pod 运行后改回原策略:
+   ```bash
+   helm upgrade hugegraph "$CHART" --devel -n hugegraph --reuse-values \
+     --set pd.image.tag=<this-version> \
+     --set store.image.tag=<this-version> \
+     --set-string pd.image.digest= \
+     --set-string store.image.digest= \
+     --set pd.podSecurityContext.fsGroupChangePolicy=Always \
+     --set store.podSecurityContext.fsGroupChangePolicy=Always \
+     --wait --timeout 15m
+   ```
 
-```bash
-helm upgrade hugegraph "$CHART" --devel -n hugegraph --reuse-values \
-  --set pd.podSecurityContext.fsGroupChangePolicy=OnRootMismatch \
-  --set store.podSecurityContext.fsGroupChangePolicy=OnRootMismatch \
-  --wait --timeout 15m
-```
+1. **逐个重建 Store Pod,并确认新 Pod 已应用 `Always` 策略。**
+
+   在 `values-cluster.yaml`(`store.updateStrategy.type=OnDelete`)预设下,`helm 
upgrade` 不会自动重建 Store Pod。
+   即使镜像名称匹配,旧 Pod 也并未以 `Always` 策略重新挂载 PVC。
+   请按[受控滚动升级流程](./hugegraph-helm-operations.md#6-安全逐个滚动更新-store-镜像)逐个删除并重建 
Store Pod。

Review Comment:
   Minor: `#6-安全逐个滚动更新-store-镜像` matches no id on the rendered operations page, 
whose heading sets `{#6-rolling-store-images-safely}`, so the link opens the 
page top instead of the rollout procedure. Use 
`#6-rolling-store-images-safely`, as the English page does, in #574 and rebase.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to