-
Notifications
You must be signed in to change notification settings - Fork 856
helm: Allow configuration of volumes per replica #1107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm: Allow configuration of volumes per replica #1107
Conversation
This is a lot more flexible than forcing the replica count to be either
4 or 16.
I have verified there are no other breaking changes:
```
$ helm template rustfs helm/rustfs > before.txt
$ helm template rustfs helm/rustfs > after.txt
$ diff -u before.txt after.txt
--- before.txt 2025-12-10 18:24:05
+++ after.txt 2025-12-10 18:24:11
@@ -128,17 +128,15 @@
- sh
- -c
- |
- if [ "$REPLICA_COUNT" -eq 4 ]; then
- for i in $(seq 0 $(($REPLICA_COUNT - 1))); do
- mkdir -p /data/rustfs$i
- done;
- elif [ "$REPLICA_COUNT" -eq 16 ]; then
- mkdir -p /data
- fi
-
+ mkdir -p /data/rustfs0
+ mkdir -p /data/rustfs1
+ mkdir -p /data/rustfs2
+ mkdir -p /data/rustfs3
chown -R 10001:10001 /data
chown -R 10001:10001 /logs
volumeMounts:
+ - name: logs
+ mountPath: /logs
- name: data-rustfs-0
mountPath: /data/rustfs0
- name: data-rustfs-1
@@ -147,8 +145,6 @@
mountPath: /data/rustfs2
- name: data-rustfs-3
mountPath: /data/rustfs3
- - name: logs
- mountPath: /logs
containers:
- name: rustfs
image: "rustfs/rustfs:latest"
@@ -165,9 +161,6 @@
name: endpoint
- containerPort: 9001
name: console
- env:
- - name: REPLICA_COUNT
- value: "4"
envFrom:
- configMapRef:
name: rustfs-config
```
|
@simonswine I reviewed the change which has different with our Rust Mode Setting. For helm installation, RustFS provides two mode
|
|
I see what you are saying, I can fix this with a bit more defaulting, but what I am confused with is, what if I wanna run 8 replicas with two volumes (or any other number than is not 1-1, 4-4, 16-4 [replica-volumes]), is that be bad for performance or just right out broken? |
|
@simonswine Good question, actually, 8 replicas are also fine, even other replicas( for example, 32 64) are also fine. As you know, MNMD mode has several node and disk combination, but helm chart can not cover all the combinations, so we just support two main combinations( 4 replicas and 16 replicas) which is used frequently. If the current helm chart can not satisfy the user's requirements, user should modify the helm chart locally, but we will not accept the change. |
|
@simonswine Hi, could y please fix the conflict? |
|
@simonswine Could y pls help to handle the conflict? |
Signed-off-by: houseme <housemecn@gmail.com>
@simonswine Could y pls change the code according to this logic? @houseme is our administration, he fix the conflicts, but i think the change code don't satisfy our requirement. If there is no any update, we will close PR due to it hangs on a long time. Thx. |
|
@simonswine Due to the PR, there hasn't been any update for more than 3 weeks. We will close this PR. If you want to continue contributing with this PR, you can reopen it or create a new one. Thx again for you contributio. |
This is a lot more flexible than forcing the replica count to be either
4 or 16.
I have verified there are no other breaking changes: