Skip to content

Commit 59be5c5

Browse files
zxh326timfeirg
andauthored
update sidecar docs (#1265)
* update sidecar docs Signed-off-by: Xuhui zhang <xuhui@juicedata.io> * translate Signed-off-by: Xuhui zhang <xuhui@juicedata.io> * minor improvements --------- Signed-off-by: Xuhui zhang <xuhui@juicedata.io> Co-authored-by: timfeirg <kkcocogogo@gmail.com>
1 parent 64e0f8b commit 59be5c5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

docs/en/administration/going-production.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Best practices and recommended settings when going production.
1616

1717
## Sidecar recommendations {#sidecar}
1818

19-
Current CSI Driver doesn't support exit order of sidecar containers, this essentially means there's no guarantee that sidecar JuiceFS client exits only after application container termination. This can be rooted back to Kubernetes sidecar's own limitations, however, this changes in [v1.28](https://kubernetes.io/blog/2023/08/25/native-sidecar-containers) as native sidecar is supported. So if you're using newer Kubernetes and wish to use native sidecar, mark your requests at our [GitHub issue](https://github.com/juicedata/juicefs-csi-driver/issues/976).
19+
Starting from v0.27.0, CSI Driver supports Kubernetes [native sidecar containers](https://kubernetes.io/blog/2023/08/25/native-sidecar-containers). So if you are running Kubernetes v1.29 with CSI Driver v0.27.0 or newer versions, no special configurations are needed to ensure optimal exit order (sidecar containers terminate only after the application containers have exited).
2020

21-
Hence, before our users widely adopt Kubernetes v1.28 (which allows us to implement native sidecar mount), we recommend that you use `preStop` to control exit order:
21+
But if your cluster does not yet meet the above version requirements, we recommend users configure the `preStop` lifecycle hook to control exit order:
2222

2323
```yaml
2424
mountPodPatch:

docs/en/guide/cache.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ When multiple cache directories are used, make sure all items have the same avai
136136
name: jfs-cache-pvc
137137
- type: HostPath
138138
path: /var/jfsCache
139+
# emptyDir is supported in v0.26.2 and above
140+
- type: EmptyDir
141+
sizeLimit: 1024Mi
142+
medium: Memory
139143
mountOptions:
140144
- cache-size=204800
141145
- free-space-ratio=0.01

docs/zh_cn/administration/going-production.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ sidebar_position: 1
1616

1717
## Sidecar 模式推荐设置 {#sidecar}
1818

19-
目前 CSI 驱动不支持为 sidecar 模式的 mount 容器设置退出顺序,无法做到在应用容器退出以后,sidecar 才退出。这是由于 Kubernetes sidecar 自身便不支持退出顺序导致的,该特性在 [v1.28](https://kubernetes.io/blog/2023/08/25/native-sidecar-containers) 原生 sidecar 得到支持,因此如果你使用新版 Kubernetes 并且有相关需求,请在对应的 [GitHub issue](https://github.com/juicedata/juicefs-csi-driver/issues/976) 下记录需求。
19+
### 退出顺序
2020

21-
因此,在用户广泛采纳 Kubernetes v1.28,让 CSI 驱动有机会实现原生 sidecar 之前,我们建议用户通过设置 `preStop` 来满足延迟退出的需求:
21+
目前 CSI 驱动支持 Kubernetes 原生的 [sidecar](https://kubernetes.io/blog/2023/08/25/native-sidecar-containers) 模式,如果你的集群 Kubernetes 版本在 v1.29 及以上,CSI 在 v0.27.0 及以上,无需任何改动即可做到应用容器退出以后,sidecar 才退出。
22+
23+
如果你的集群不满足上述版本要求,我们建议用户通过设置 `preStop` 来满足延迟退出的需求:
2224

2325
```yaml
2426
mountPodPatch:

docs/zh_cn/guide/cache.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ mountOptions:
135135
name: jfs-cache-pvc
136136
- type: HostPath
137137
path: /var/jfsCache
138+
# v0.26.2 及以上支持 emptyDir
139+
- type: EmptyDir
140+
sizeLimit: 1024Mi
141+
medium: Memory
138142
mountOptions:
139143
- cache-size=204800
140144
- free-space-ratio=0.01

0 commit comments

Comments
 (0)