apache / apache/fluss

[helm] Support multi-disk data.dirs in the tablet StatefulSet

Open
#4,106 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
625
Avg merge
3d 14h
Merged PRs (30d)
97

Description

### Motivation

Fluss 1.0 supports local multi-disk (JBOD) storage via `data.dirs`, which supersedes `data.dir`: tablet servers place new tablets on the least-loaded disk, balancing log and KV storage independently.

The Helm chart cannot express this today:

- `helm/templates/sts-tablet.yaml` renders exactly one `volumeClaimTemplates` entry (named `data`, sized by `tablet.storage.size`).
- The mount path `/tmp/fluss/data` is hardcoded in the template and mirrored by `data.dir: /tmp/fluss/data` in `values.yaml`.

So a chart-deployed tablet server is limited to a single PVC per pod and cannot benefit from JBOD placement.

### Proposal

1. Drive `volumeClaimTemplates` from a values list, so each entry gets its own name, size, and storage class, for example:

```yaml
tablet:
storage:
volumes:
- name: data-0
size: 100Gi
storageClass: fast
- name: data-1
size: 100Gi
storageClass: fast
```

2. Derive the container `volumeMounts` paths from the same list instead of the hardcoded `/tmp/fluss/data`.
3. Emit `data.dirs` (comma-separated mount paths) in the rendered server configuration instead of `data.dir` when more than one volume is configured.

Backward compatibility: a single-volume configuration keeps rendering today's single PVC and `data.dir`, so existing installations upgrade without a StatefulSet storage change.

### Affected files

- `helm/templates/sts-tablet.yaml` (`volumeClaimTemplates` loop, `volumeMounts`)
- `helm/values.yaml` (volume list, `data.dirs`)
- `helm/templates/configmap.yaml` / config rendering (emit `data.dirs`)
- `helm/tests/` (unit tests for single- and multi-disk rendering)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with helm/templates/sts-tablet.yaml and helm/values.yaml to trace the current single-volume and data.dir rendering, then inspect helm/templates/configmap.yaml and the existing helm/tests/. Done means single-volume values preserve the current PVC and data.dir output, while multi-volume values render one claim and mount per entry, use data.dirs, and have unit coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, yaml
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.