Skip to content

Add api token to service env#8

Merged
lukaskratzel merged 3 commits intomainfrom
feat/scaling-api
Mar 12, 2026
Merged

Add api token to service env#8
lukaskratzel merged 3 commits intomainfrom
feat/scaling-api

Conversation

@lukaskratzel
Copy link
Copy Markdown

@lukaskratzel lukaskratzel commented Mar 9, 2026

Summary by CodeRabbit

  • New Features

    • Added admin API token configuration via Kubernetes Secret with configurable secret name and key reference.
    • Updated gateway routing identifier used for instance routing.
  • Documentation

    • Enhanced Helm chart documentation to describe the new secret configuration fields and routing change.

@lukaskratzel lukaskratzel self-assigned this Mar 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Warning

Rate limit exceeded

@lukaskratzel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41dd0ac8-a1ff-4430-aec7-e33c36ce4d4a

📥 Commits

Reviewing files that changed from the base of the PR and between 8887fc8 and 8d86634.

📒 Files selected for processing (4)
  • charts/theia-cloud/Chart.yaml
  • charts/theia-cloud/README.md
  • charts/theia-cloud/templates/service.yaml
  • charts/theia-cloud/values.yaml
📝 Walkthrough

Walkthrough

Adds configuration to inject an admin API token from a Kubernetes Secret into the Theia Cloud deployment, documents the new values, and renames a gateway route reference.

Changes

Cohort / File(s) Summary
Admin API Token Configuration
charts/theia-cloud/values.yaml, charts/theia-cloud/templates/service.yaml, charts/theia-cloud/README.md
Introduces service.adminApiTokenSecret with name and key in values; deployment template conditionally injects ADMIN_API_TOKEN via secretKeyRef when both are set; README documents the new fields.
Gateway Route Configuration
charts/theia-cloud/values.yaml
Updates service.instancesRouteName from "theia-cloud-demo-ws-ingress" to "theia-cloud-demo-ws-route".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I tucked a token in a secret nest,
Values and templates doing their best,
Routes renamed as I hop on through,
Docs whisper secrets — tidy and true,
A tiny rabbit cheers this config fest! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an API token to the service environment variables.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/scaling-api

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@charts/theia-cloud/templates/service.yaml`:
- Around line 35-40: The template unconditionally emits an ADMIN_API_TOKEN env
var referencing .Values.service.adminApiTokenSecret.name and
.Values.service.adminApiTokenSecret.key which causes pod crashes when the Secret
isn't provided; update charts/theia-cloud/templates/service.yaml to guard that
env entry with a Helm conditional that checks both
.Values.service.adminApiTokenSecret.name and
.Values.service.adminApiTokenSecret.key are non-empty (e.g., using if and and)
before rendering the secretKeyRef, or alternatively use the required function in
the chart (e.g., required on the name/key) to fail fast with a clear message;
target the ADMIN_API_TOKEN env block and the
.Values.service.adminApiTokenSecret.name/.key symbols when making the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34316c8b-fb70-4c19-a5cc-e6e51a64c5c5

📥 Commits

Reviewing files that changed from the base of the PR and between c99bd4c and c624520.

📒 Files selected for processing (3)
  • charts/theia-cloud/README.md
  • charts/theia-cloud/templates/service.yaml
  • charts/theia-cloud/values.yaml

@lukaskratzel lukaskratzel merged commit 6d445b5 into main Mar 12, 2026
3 checks passed
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.

2 participants