docs(external-apps): rewrite guide for ApplicationDefinition API#488
Conversation
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 29 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation rewrite specifying external application package repository layout with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request rewrites the external applications guide to align with current APIs and conventions, covering repository structure, platform charts, and naming conventions. Feedback suggests adding the scripts/ directory to the repository layout, removing redundant entries in the keysOrder example, and correcting the documentation regarding supported JSON Schema keywords in Kubernetes.
| init.yaml # Bootstrap manifest (GitRepository + HelmRelease) | ||
| packages/ | ||
| core/platform/ # Platform chart: namespaces, operators, HelmCharts, ApplicationDefinitions | ||
| apps/<app-name>/ # Helm chart for each user-installable application |
| - - metadata | ||
| - - metadata | ||
| - name |
There was a problem hiding this comment.
| | `release.prefix` | `<metadata.name>-` | `my-app-` | | ||
| | `openAPISchema` title | always `"Chart Values"` | — | | ||
|
|
||
| The `openAPISchema` field contains a single-line JSON string with the schema for the application values. It intentionally omits `allOf`/`if`/`then` conditional rules because Kubernetes `apiextensions/v1` `JSONSchemaProps` does not support these keywords. Use conditional validation only in the Helm chart's `values.schema.json`. |
There was a problem hiding this comment.
Technically, apiextensions/v1 JSONSchemaProps does support allOf, anyOf, oneOf, and not. It is if, then, and else (introduced in JSON Schema Draft 7) that are not supported in Kubernetes structural schemas. It might be worth clarifying this to avoid misleading users who might want to use allOf for schema composition.
There was a problem hiding this comment.
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 `@content/en/docs/v1/applications/external.md`:
- Line 153: Update the explanatory sentence about openAPISchema to stop listing
"allOf" as unsupported: edit the paragraph referencing the `openAPISchema` field
so it only states that the conditional keywords `if`/`then`/`else` are
unsupported by Kubernetes `apiextensions/v1` `JSONSchemaProps` (remove `allOf`
from the unsupported keywords list) and clarify that `allOf` is supported; keep
the note that conditional validation should be used in the Helm chart's
`values.schema.json`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2425e44f-5392-4c78-8cec-f2c25383cef2
📒 Files selected for processing (1)
content/en/docs/v1/applications/external.md
Update the external applications guide to reflect the current API and conventions used in the external-apps-example repository: - Replace outdated CozystackResourceDefinition references with ApplicationDefinition - Document the full platform chart structure (namespaces, HelmCharts, operator deployment, ApplicationDefinitions) - Add naming conventions table matching the main Cozystack repository - Document application chart structure and Makefile conventions - Update bootstrap manifest to use reconcileStrategy: Revision - Add HelmChart FluxCD reference link Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: ZverGuy <maximbel2003@gmail.com>
0cdc544 to
0658772
Compare
Summary
Rewrite the external applications guide to reflect the current API and conventions:
CozystackResourceDefinitionreferences withApplicationDefinitionreconcileStrategy: RevisionContext
The previous guide only covered creating a GitRepository + HelmRelease and pointed to the example repo for everything else. The rewrite provides a self-contained reference for building external application packages, based on conventions from the main Cozystack repository and the updated external-apps-example.
Summary by CodeRabbit