Skip to content

feat(crds): add AppDefinition v1beta11 with sidecars field#11

Merged
CodeByNikolas merged 1 commit intomainfrom
feature/external-ls-v2
Mar 16, 2026
Merged

feat(crds): add AppDefinition v1beta11 with sidecars field#11
CodeByNikolas merged 1 commit intomainfrom
feature/external-ls-v2

Conversation

@CodeByNikolas
Copy link
Copy Markdown

@CodeByNikolas CodeByNikolas commented Mar 16, 2026

Summary

  • Adds v1beta11 as the new storage version for the AppDefinition CRD
  • v1beta11 extends v1beta10 with a sidecars array field, where each entry is a SidecarSpec with: name, image, port, languages, cpuLimit, memoryLimit, cpuRequest, memoryRequest, mountWorkspace
  • v1beta10 remains served (backward-compatible for existing resources) but is no longer the storage version
  • Chart version bumped to 1.2.0-next.1

Context

Part of the external-LS sidecar redesign tracked in EduIDE-Cloud PR eclipse-theia#70. The operator now reads sidecars from AppDefinitionSpec (v1beta11) to create per-language-server sidecar Deployments and Services alongside the Theia IDE pod. The CRD must register v1beta11 on the cluster before the new deployment chart (EduIDE-deployment PR eclipse-theia#73) can be installed.

Testing

After this PR's preview chart publishes (1.2.0-next.1.pr-<N>):

helm upgrade --install theia-cloud-crds \
  oci://ghcr.io/eduide/charts/theia-cloud-crds \
  --version 1.2.0-next.1.pr-<N> \
  -n theia-cloud --reuse-values

Then verify: kubectl api-resources --api-group=theia.cloud shows AppDefinition with v1beta11.

Summary by CodeRabbit

  • Chores

    • Updated chart version to 1.2.0-next.1.
  • New Features

    • Added new CustomResourceDefinition version with enhanced OpenAPI v3 schema validation, supporting expanded configuration options for image management, ingress routing, instance scaling, monitoring, and sidecar containers.

Adds v1beta11 as the new storage version for the AppDefinition CRD.
v1beta11 extends v1beta10 with a 'sidecars' array field (SidecarSpec)
supporting: name, image, port, languages, cpu/memory limits+requests,
and mountWorkspace. v1beta10 remains served but is no longer storage.

Part of the external-LS sidecar redesign (EduIDE-Cloud PR eclipse-theia#70).
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

The Helm chart for theia-cloud-crds is updated with a patch version bump and new appVersion field. A new CRD version (v1beta11) is introduced with comprehensive OpenAPI schema validation for app definitions, including properties for image management, resource limits, networking, and monitoring configuration.

Changes

Cohort / File(s) Summary
Chart Metadata
charts/theia-cloud-crds/Chart.yaml
Version field bumped from 1.2.0-next.0 to 1.2.0-next.1; new appVersion field added with value "1.2.0-next".
CRD Schema Definition
charts/theia-cloud-crds/templates/appdefinition-spec-resource.yaml
New CRD version v1beta11 added with comprehensive OpenAPI v3 schema including spec properties (image, resources, networking, monitoring), validation rules, status subresource with operatorStatus/operatorMessage, and required field constraints. Existing v1beta10 version maintained.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hop and bound with joy so keen,
New version bumped—a patch pristine!
Beta eleven hops in view,
With schemas rich and validations true,
Status and spec now formally blessed,
Our CRD's put to the test!

🚥 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 accurately describes the main change: adding AppDefinition v1beta11 with the sidecars field, which is the primary purpose of this PR.
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 feature/external-ls-v2
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

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.

🧹 Nitpick comments (1)
charts/theia-cloud-crds/templates/appdefinition-spec-resource.yaml (1)

48-51: Minor: Port validation inconsistency with sidecars.

The main spec port allows minimum: 0 while the sidecar port (line 110) requires minimum: 1. Port 0 typically means "OS-assigned port" which is unusual for a defined service endpoint. Consider aligning both to minimum: 1 for consistency, unless port 0 has a specific use case here.

Suggested alignment
                port:
                  type: integer
-                 minimum: 0
+                 minimum: 1
                  maximum: 65535
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/theia-cloud-crds/templates/appdefinition-spec-resource.yaml` around
lines 48 - 51, Align the port validation ranges so they are consistent: change
the main spec field "port" validation (shown in
appdefinition-spec-resource.yaml) to use minimum: 1 to match the sidecar "port"
validation (sidecar.port) unless you have a deliberate reason to allow 0; update
the YAML schema entry for the top-level/spec "port" to minimum: 1 so both
definitions require ports >= 1.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@charts/theia-cloud-crds/templates/appdefinition-spec-resource.yaml`:
- Around line 48-51: Align the port validation ranges so they are consistent:
change the main spec field "port" validation (shown in
appdefinition-spec-resource.yaml) to use minimum: 1 to match the sidecar "port"
validation (sidecar.port) unless you have a deliberate reason to allow 0; update
the YAML schema entry for the top-level/spec "port" to minimum: 1 so both
definitions require ports >= 1.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c44b27f6-d8f8-4b15-b5e8-4dfff05dbd02

📥 Commits

Reviewing files that changed from the base of the PR and between 6d445b5 and 8370e6f.

📒 Files selected for processing (2)
  • charts/theia-cloud-crds/Chart.yaml
  • charts/theia-cloud-crds/templates/appdefinition-spec-resource.yaml

Copy link
Copy Markdown

@lukaskratzel lukaskratzel left a comment

Choose a reason for hiding this comment

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

Great change!

@CodeByNikolas CodeByNikolas merged commit 757d45f into main Mar 16, 2026
6 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