Skip to content

docs(helm): document null as the way to remove an inherited env key - #6801

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/enterprise-ignore-limits
Aug 18, 2026
Merged

docs(helm): document null as the way to remove an inherited env key#6801
waleedlatif1 merged 3 commits into
stagingfrom
fix/enterprise-ignore-limits

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Setting app.env.KEY: "" cannot clear a key that app.envDefaults sets — the Secret template drops empty values, and the deployment template treats an empty override as "not overridden" and still inlines the default (inline env beats envFrom). Helm's own KEY: null deletion is the supported mechanism and already works today, on charts already deployed
  • The empty-string behavior is load-bearing, not a bug: all 145 app.env keys ship as "" placeholders, and 10 collide with a real envDefaults value (NEXT_PUBLIC_APP_URL, BETTER_AUTH_URL, NEXT_PUBLIC_BRAND_NAME, VERTEX_LOCATION, EMAIL_VERIFICATION_ENABLED, …). If "" meant "delete", a default install would blank those out
  • README: document null, including the --reuse-values and Argo CD valuesObject caveats. Corrects the existing claim that a value in app.env "always wins" over app.envDefaults — true only for non-empty values
  • values.yaml and the self-hosting docs: same guidance where operators actually look
  • sim-helm skill: record why a chart-level "unset list" is the wrong shape here (Helm merges dicts but not lists, so it can't be overridden downstream)
  • Tests: lock in that null removes a key and "" does not, so a future template edit can't silently break cooperation with Helm's merge

No template logic changed — this is docs plus a regression net. Most common real-world case is a free-tier cap inherited from a chart older than 1.5.0, which preset FREE_TABLES_LIMIT: "3" and FREE_TABLE_ROWS_LIMIT: "1000" under envDefaults.

Type of Change

  • Documentation

Testing

helm lint clean and 105/105 chart unit tests pass, verified against the digest-pinned helm-unittest image CI uses, not just the local plugin. Also confirmed null deletion end-to-end against an unmodified chart copy with the old presets restored (values-file and --set forms, envDefaults and app.env paths), and that stripping the placeholders renders byte-identical output. Repo-wide: bun run lint, block-registry check, and all 29 check:audits pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 18, 2026 1:16am

Request Review

@cursor

cursor Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation and Helm unit tests only; no runtime or template behavior changes in the diff.

Overview
Documents how Helm operators remove inherited env keys (e.g. old free-tier caps) using null, not empty strings — and adds a regression test suite so that behavior stays locked.

Docs now explain that only non-empty app.env overrides beat app.envDefaults; "" is treated as unspecified. Removal is app.envDefaults.KEY: null (and the same key must be nulled in every layer that sets it, including ESO remoteRefs). Caveats cover --reuse-values, Argo CD valuesObject, and Compose .env deletion. Updates land in the Helm README (new section), self-hosting env docs, values.yaml comments, and the sim-helm skill reference.

Tests (env-null-deletion_test.yaml plus fixture values) assert null drops keys from inlined defaults and the chart Secret, "" does not clear envDefaults, partial nulling leaves other defaults, and nulling only app.env still applies envDefaults.

Chart version bumps to 1.5.4; no Helm template logic changes in this PR.

Reviewed by Cursor Bugbot for commit f5316c5. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR documents Helm’s null deletion semantics for inherited environment keys and clarifies behavior across chart-managed, existing-secret, and External Secrets configurations.

  • Adds operator guidance to the chart README, self-hosting documentation, values comments, and Helm skill reference.
  • Adds regression coverage for empty-string behavior, null deletion, layered defaults, and required-secret validation.
  • Bumps the chart version from 1.5.3 to 1.5.4.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
helm/sim/README.md Documents layered null deletion, secret-mode behavior, deployment-tool caveats, and a local-chart verification command; the previously reported issues are addressed.
apps/docs/content/docs/en/platform/self-hosting/environment-variables.mdx Adds matching self-hosting guidance for removing inherited limits and handling ESO, reuse-values, and Argo CD.
helm/sim/tests/env-null-deletion_test.yaml Adds focused regression tests covering empty overrides, deletion from both configuration layers, Secret omission, and boot-critical validation.
helm/sim/values.yaml Adds comments directing operators to use null rather than an empty string when deleting inherited defaults.
helm/sim/Chart.yaml Bumps the chart patch version to publish the documentation and regression-test update.

Reviews (3): Last reviewed commit: "docs(helm): say null must be applied in ..." | Re-trigger Greptile

Comment thread helm/sim/README.md Outdated
Comment thread helm/sim/README.md Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ba302bc. Configure here.

Comment thread helm/sim/README.md Outdated
Setting `app.env.KEY: ""` cannot clear a key that `app.envDefaults` sets:
the Secret template drops empty values, and the deployment template treats
an empty override as "not overridden" and still inlines the default. Helm's
own `KEY: null` deletion is the supported mechanism and already works.

The empty-string behavior is load-bearing, not a bug — every key under
`app.env` ships as a "" placeholder, and ten collide with a real
`envDefaults` value (NEXT_PUBLIC_APP_URL, BETTER_AUTH_URL, ...), so "" has
to read as "unspecified" or a default install would blank them out.

- README: document `null`, with the --reuse-values and Argo CD valuesObject
  caveats; correct the claim that `app.env` always wins over `app.envDefaults`
- values.yaml + self-hosting docs: same guidance where operators look
- sim-helm skill: record why an unset list is the wrong shape here
- tests: lock in that null removes a key and "" does not
…uired-secret claim

- The verify snippet used a `sim/sim` repo alias that this chart never
  publishes; every other instruction installs from the local `./helm/sim`
  path, so the command could not run as written
- Nulling a boot-critical key only fails at template time with the
  chart-managed Secret. `existingSecret` mode skips that validation
  entirely (the chart cannot read a pre-created Secret), and under ESO the
  key must instead be mapped in externalSecrets.remoteRefs.app
`null` deletes a key from the map it is applied to, not from the pod. A key
set in both `app.env` and `app.envDefaults` survives a null on the app.env
entry alone — the deployment then inlines the envDefaults value again. Under
ESO a retained `externalSecrets.remoteRefs.app` mapping keeps syncing the key
regardless of app.env.

- README and self-hosting docs: drop the "works in all three secret modes"
  shorthand and spell out that every layer setting the key must be nulled,
  including the ESO remote mapping
- tests: cover both halves — nulling only app.env restores the envDefault,
  nulling both actually removes the key
- chart 1.5.4; staging took 1.5.3 in the meantime
@waleedlatif1
waleedlatif1 force-pushed the fix/enterprise-ignore-limits branch from ba302bc to f5316c5 Compare August 18, 2026 01:11
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f5316c5. Configure here.

@waleedlatif1
waleedlatif1 merged commit edc25aa into staging Aug 18, 2026
29 of 30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/enterprise-ignore-limits branch August 18, 2026 01:16
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