Skip to content

[helm] Add opt-in release-scoped resource names - #4424

Draft
affo wants to merge 1 commit into
apache:mainfrom
affo:la-helm-release-scoped-names
Draft

affo wants to merge 1 commit into
apache:mainfrom
affo:la-helm-release-scoped-names

Conversation

@affo

@affo affo commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Every resource the chart creates carries a fixed name — coordinator-server, tablet-server, fluss-conf-file, and the matching headless Services — and every cluster uses the ZooKeeper root path /fluss. Two releases therefore cannot share a namespace. That hurts wherever namespace creation is restricted: the people allowed to run Fluss clusters often are not the people allowed to create namespaces, so they cannot stand up a second cluster at all.

This routes every name through a helper and adds a releaseScopedResourceNames option that prefixes each resource with fluss.fullname and moves the ZooKeeper root path to /fluss/<release>.

Default (false) true
ConfigMap fluss-conf-file <release>-fluss-conf-file
Coordinator StatefulSet / PDB coordinator-server <release>-fluss-coordinator-server
Tablet StatefulSet / PDB tablet-server <release>-fluss-tablet-server
Headless Services {coordinator,tablet}-server-hs <release>-fluss-…-hs
Metrics Services <release>-…-metrics-hs <release>-fluss-…-metrics-hs
ZooKeeper root /fluss /fluss/<release>

The cross-references move with the names: spec.serviceName, the fluss-conf volume's configMap.name, and the ADVERTISED_LISTENERS FQDN baked into both container commands.

Why it is off by default

A StatefulSet cannot be renamed in place. Helm deletes the old one and creates a new one, which orphans the PersistentVolumeClaims created from volumeClaimTemplates. Making release-scoped names the default would move every existing release on the next helm upgrade, so operators opt in deliberately instead. The values comment and the helper docblock both record that the default is expected to flip in a later release, after which the option is deprecated.

This mirrors the Apache Airflow chart, which solved the same problem with useStandardNaming (also defaulting to the legacy behaviour).

Also included

  • A validation error when the generated prefix exceeds 33 characters, since the longest generated name adds 30 and DNS labels cap at 63. It names the offending prefix and points at fullnameOverride. It applies only when the option is on, because fixed names cannot exceed the limit.
  • Docs: "Running several Fluss clusters in one namespace" under Advanced Configuration, and "Enabling release-scoped names on an existing release" under Upgrading. The latter covers the StatefulSet replacement, the orphaned PVCs, pinning zookeeper.path.root: /fluss to keep cluster state while taking the new names, and the side-by-side migration alternative.

Test Plan

  • New helm/tests/naming_test.yaml: 4 suites covering the fixed names and cross-references by default, the release-scoped names and cross-references when opted in, the ZooKeeper root path in both modes, and the name-length validation.
  • helm unittest ./helm — 59 suites, 159 tests pass. No existing test needed changing, which is itself part of the evidence that the default is unchanged.
  • helm lint ./helm — clean.
  • Rendered helm template with the option off, both with plain values and with PDBs, Prometheus metrics, and SASL enabled, and diffed against the same render on main: byte-for-byte identical.
  • Rendered two releases into one namespace with the option on and confirmed no resource name and no ZooKeeper root is shared.

🤖 Generated with Claude Code

Every resource the chart creates had a fixed name (coordinator-server,
tablet-server, fluss-conf-file and the matching headless Services), and
every cluster used the ZooKeeper root path /fluss. Two releases could
therefore not share a namespace, which is a problem wherever namespace
creation is restricted and a team needs more than one Fluss cluster.

Route every name through a helper and add releaseScopedResourceNames,
which prefixes each resource with fluss.fullname and moves the
ZooKeeper root path to /fluss/<release>.

The option is off by default. Renaming a StatefulSet makes Helm replace
it and orphans its PersistentVolumeClaims, so an existing release must
opt in deliberately. With the option off the rendered output is
byte-for-byte identical to before.

Also validate that generated names stay within the 63 character DNS
label limit when the option is on, and document both the multi-cluster
setup and the migration path for an existing release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant