Skip to content

fix(k8s): add missing AUTH_JWT_SECRET to values-development.yaml - #6610

Merged
aicam merged 2 commits into
apache:mainfrom
aicam:fix/dev-values-jwt-secret
Jul 20, 2026
Merged

fix(k8s): add missing AUTH_JWT_SECRET to values-development.yaml#6610
aicam merged 2 commits into
apache:mainfrom
aicam:fix/dev-values-jwt-secret

Conversation

@aicam

@aicam aicam commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds the AUTH_JWT_SECRET environment variable to bin/k8s/values-development.yaml.

The default values.yaml sets AUTH_JWT_SECRET inside texeraEnvVars, but values-development.yaml overrides texeraEnvVars as a whole list. Helm replaces lists rather than merging them, so a local install with -f values-development.yaml silently drops AUTH_JWT_SECRET from every Texera service.

The computing-unit manager reads this variable directly via env.get(KEY).get when launching a Kubernetes computing unit (ComputingUnitManagingResource.scala), so the missing value makes computing-unit creation fail hard:

java.util.NoSuchElementException: None.get
POST /api/computing-unit/create HTTP/1.1" 500

Any local Kubernetes deployment following the development values hits this the moment a user tries to create a computing unit. The fix adds the variable with the same development-only default already used in values.yaml, so all services share one consistent JWT signing secret.

Any related issues, documentation, discussions?

None — standalone bug fix in the development values overlay. Independent of any other in-flight bin/k8s work.

How was this PR tested?

Reproduced and verified on a local minikube cluster (helm install ... -f values-development.yaml):

  • Before: creating a Kubernetes computing unit returned HTTP 500; the computing-unit manager logged java.util.NoSuchElementException: None.get. kubectl exec into the manager pod confirmed AUTH_JWT_SECRET was unset.
  • After (helm upgrade with this change): AUTH_JWT_SECRET is present on the manager (and all services), the manager rolled out cleanly, and the None.get error no longer occurs.

Also confirmed the added value is byte-for-byte identical to the AUTH_JWT_SECRET default in values.yaml, so development and production use the same variable and the dev overlay stops diverging.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.8)

The default values.yaml sets AUTH_JWT_SECRET in texeraEnvVars, but
values-development.yaml overrides texeraEnvVars as a whole list and omitted
it. Helm replaces lists rather than merging, so a local install with
`-f values-development.yaml` drops AUTH_JWT_SECRET from every service.

The computing-unit manager reads this variable via env.get(KEY).get when
launching a Kubernetes computing unit, so the missing value makes CU creation
fail hard with `java.util.NoSuchElementException: None.get` (HTTP 500 on
POST /api/computing-unit/create). Any local k8s deployment hits this the moment
a user tries to create a computing unit.

Add AUTH_JWT_SECRET to the development values with the same development-only
default as values.yaml, so all services share one consistent signing secret.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sk8aHo2kwTB86ULNSXyBdm
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @bobbai00
    You can notify them by mentioning @bobbai00 in a comment.

@aicam
aicam requested a review from mengw15 July 20, 2026 17:51
@aglinxinyuan
aglinxinyuan requested a review from Copilot July 20, 2026 19:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

Comment thread bin/k8s/values-development.yaml Outdated
@aicam
aicam enabled auto-merge July 20, 2026 19:34
Address review feedback: replace the random-looking hex dev secret with an
obvious non-secret placeholder (all 'a', 64 chars / 512-bit) so it plainly
reads as a throwaway local value and won't trip secret scanners.

It stays a fixed shared string rather than empty or "random": every service
must sign/verify with the same key, an empty value yields an invalid (0-length)
HMAC key, and "random" generates a different key per pod (breaking cross-service
auth). Production still overrides it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sk8aHo2kwTB86ULNSXyBdm
@aicam
aicam added this pull request to the merge queue Jul 20, 2026
Merged via the queue into apache:main with commit f14cd39 Jul 20, 2026
20 checks passed
@aicam
aicam deleted the fix/dev-values-jwt-secret branch July 20, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants