fix(k8s): make the Helm chart work under any release name - #7788
Open
aicam wants to merge 1 commit into
Open
Conversation
The chart derives in-cluster hostnames from `.Release.Name`, but the
lakefs and lakekeeper sub-charts address Postgres and MinIO from their
own values blocks, where the names are hardcoded as `texera-postgresql`
and `texera-minio`. Helm does not template values files, so those
references cannot be release-derived and silently point at Services that
do not exist unless the release happens to be named `texera`:
$ helm install myrel bin/k8s
Secret/myrel-lakefs database_connection_string -> texera-postgresql
ConfigMap/myrel-lakefs blockstore.endpoint -> texera-minio:9000
Secret/myrel-lakekeeper-config-envs LAKEKEEPER__PG_HOST_{R,W}
-> texera-postgresql
while the Services actually created are `myrel-postgresql` /
`myrel-minio`. LakeFS and Lakekeeper then fail to reach the database and
the object store.
Pin the two sub-charts with `fullnameOverride` so the names the sibling
values reference are constants, and resolve them in chart templates
through new `texera.postgresql.fullname` / `texera.minio.fullname`
helpers so both sides always agree. The helpers fall back to the
previous `<release>-<chart>` form if the override is cleared.
Give the generated S3 credentials Secret a fixed name for the same
reason -- `values-aws.yaml` wires it into `lakefs.extraEnvVars` and
carried a note telling the user to hand-edit it; that note is no longer
needed.
Rendering release `texera` is byte-identical to before (all three values
files), so existing deployments are unaffected.
Signed-off-by: ali <arisheh@uci.edu>
Contributor
Backport auto-label reportThis
|
Contributor
Automated Reviewer SuggestionsBased on the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The chart derives in-cluster hostnames from
.Release.Name, but thelakefsandlakekeepersub-charts have to address Postgres and MinIO from their own valuesblocks — and Helm does not template values files, so those references are hardcoded to
texera-postgresql/texera-minio:Those names only exist when the Helm release happens to be named
texera. Install underany other release name and they dangle — LakeFS cannot reach the database or the object
store, and Lakekeeper cannot reach the database, while every other service (which goes
through
{{ .Release.Name }}-postgresqlin the templates) works fine. The failure isconfusing because the chart installs cleanly and only the storage tier misbehaves.
Rendering
helm template myrel bin/k8sonmaintoday:Secret/myrel-lakefs→database_connection_stringtexera-postgresqlmyrel-postgresqlConfigMap/myrel-lakefs→blockstore.endpointtexera-minio:9000myrel-minioSecret/myrel-lakekeeper-config-envs→LAKEKEEPER__PG_HOST_R/_Wtexera-postgresqlmyrel-postgresqlThe fix. Since the referencing side cannot be templated, make the referenced side a
constant: pin the two sub-charts with
fullnameOverride, and resolve the same names inchart templates through two new helpers so both sides always agree.
The helpers keep the previous
<release>-<chart>form as a fallback, so clearing theoverride restores the old naming rather than breaking the chart. The 12 template
references to
{{ .Release.Name }}-postgresql(JDBC URLs + the passwordsecretKeyRef),the two MinIO references in
_helpers.tpl, the LiteLLMDATABASE_URL, and theExternalNamemirrors in the computing-unit namespace all go through the helpers now.The chart-generated S3 credentials Secret gets a fixed name for the same reason:
values-aws.yamlwires it intolakefs.extraEnvVarsand carried a note telling thereader to hand-edit both
name:fields when the release is not calledtexera. Thatnote is no longer needed and has been dropped.
One consequence worth calling out for reviewers: the pinned names make the chart
release-name independent, but they also mean two Texera releases can no longer coexist in
a single namespace. That was already effectively true —
workflowComputingUnitPool.namespaceand the
ExternalNamemirrors collide between releases regardless, andvalues.yamlalready warns about it — so this codifies an existing constraint rather than adding one.
Any related issues, documentation, discussions?
No separate issue was filed; the problem was found while writing cluster deployment
notes for the chart. Comments in
values.yaml,values-aws.yamland_helpers.tplareupdated in this PR to explain why the names are pinned, so the constraint is documented
where someone would next be tempted to un-pin it.
How was this PR tested?
The chart has no automated render tests, so this was verified by rendering and diffing.
1. Existing deployments are unaffected — release
texerarenders byte-identically.Rendered
helm template texera bin/k8sbefore and after the change, for all three valuesfiles, and diffed (filtering only Lakekeeper's
encryptionKey, which the sub-chartregenerates randomly on every render):
2. The bug is fixed for other release names. A script parses the rendered manifests,
base64-decodes Secret values (so
LAKEKEEPER__PG_HOST_*and the LakeFS connection stringare visible), collects every reference to a
*-postgresql/*-minio/*-s3-credentialsobject, and checks each one against the set of resources the renderactually creates:
All nine combinations (3 release names x 3 values files) render with no dangling
references, and
helm lintpasses.Not covered: this is a static render check, so it verifies the names now agree; it does
not exercise a live LakeFS/Lakekeeper connection under a non-
texerarelease. Given theonly change is which hostname string is emitted, and release
texerais unchanged, anin-cluster run seemed disproportionate — happy to add one if a reviewer prefers.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5