Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/administration/going-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Best practices and recommended settings when going production.

## Sidecar recommendations {#sidecar}

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).
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).

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:
But if your cluster does not yet meet the above version requirements, we recommend users configure the `preStop` lifecycle hook to control exit order:

```yaml
mountPodPatch:
Expand Down
4 changes: 4 additions & 0 deletions docs/en/guide/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ When multiple cache directories are used, make sure all items have the same avai
name: jfs-cache-pvc
- type: HostPath
path: /var/jfsCache
# emptyDir is supported in v0.26.2 and above
- type: EmptyDir
sizeLimit: 1024Mi
medium: Memory
mountOptions:
- cache-size=204800
- free-space-ratio=0.01
Expand Down
6 changes: 4 additions & 2 deletions docs/zh_cn/administration/going-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ sidebar_position: 1

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

目前 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) 下记录需求。
### 退出顺序

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

如果你的集群不满足上述版本要求,我们建议用户通过设置 `preStop` 来满足延迟退出的需求:

```yaml
mountPodPatch:
Expand Down
4 changes: 4 additions & 0 deletions docs/zh_cn/guide/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ mountOptions:
name: jfs-cache-pvc
- type: HostPath
path: /var/jfsCache
# v0.26.2 及以上支持 emptyDir
- type: EmptyDir
sizeLimit: 1024Mi
medium: Memory
mountOptions:
- cache-size=204800
- free-space-ratio=0.01
Expand Down