Fix: Add missing components to `distro-full` bundle
The distro-full bundle was missing critical components that exist in paas-full, causing multiple pod failures during installation. This PR adds the missing packages and fixes dependency issues.
When installing cozystack with bundle-name: "distro-full", several pods failed to start:
- CozystackResourceDefinition CRD missing - cozystack-controller pod: CrashLoopBackOff - lineage-controller-webhook pods: CrashLoopBackOff - Error: no matches for kind "CozystackResourceDefinition" in version "cozystack.io/v1alpha1"
https://github.com/cozystack/cozystack/blob/a861814c241e38360f03f89ef44eb1791e4800fd/packages/system/cozystack-resource-definition-crd/definition/cozystack.io_cozystackresourcedefinitions.yaml#L1-L14
- selfsigned-cluster-issuer ClusterIssuer missing - snapshot-validation-webhook pods: ContainerCreating (waiting for TLS secret) - snapshot-controller HelmRelease: Failed to install (timeout) - Error: clusterissuer.cert-manager.io "selfsigned-cluster-issuer" not found
https://github.com/cozystack/cozystack/blob/a861814c241e38360f03f89ef44eb1791e4800fd/packages/system/cert-manager-issuers/templates/cluster-issuers.yaml#L52-L57
https://github.com/cozystack/cozystack/blob/a861814c241e38360f03f89ef44eb1791e4800fd/packages/system/snapshot-controller/template/clusterissuer.yaml#L1-L8
- Cascading failures - linstor HelmRelease: Blocked (depends on snapshot-controller)
Summary by CodeRabbit
-
New Features
- Added two new resource-definition components to the platform distribution for enhanced configuration management.
-
Improvements
- Made certificate manager issuers required in deployments.
- Adjusted snapshot controller startup order to depend on the certificate manager issuers for improved reliability.
Summary of Changes
Hello @LoneExile, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request addresses critical omissions in the distro-full bundle that led to multiple pod failures during the installation of Cozystack. By incorporating essential components and correcting inter-component dependencies, the changes ensure a robust and functional deployment experience, preventing cascading failures and improving overall system stability.
Highlights
-
Bundle Fix: The
distro-fullbundle has been updated to include previously missing critical components, resolving installation failures. -
Missing CRD Added: The
CozystackResourceDefinition CRDand its associated definitions are now included, preventingcozystack-controllerandlineage-controller-webhookpods from crashing. -
ClusterIssuer Dependency Resolved: The
selfsigned-cluster-issuer ClusterIssueris now properly provisioned by makingcert-manager-issuersa mandatory component and adding it as a dependency for thesnapshot-controller, fixingsnapshot-validation-webhookandsnapshot-controllerinstallation issues.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
Walkthrough
Added two new releases to the distro-full bundle, removed optional: true from cert-manager-issuers, and made snapshot-controller depend on both cilium and cert-manager-issuers.
Changes
| Cohort / File(s) | Summary |
|---|---|
Distribution bundle configuration packages/core/platform/bundles/distro-full.yaml |
Added cozystack-resource-definition-crd and cozystack-resource-definitions releases (with releaseName, chart, namespace, dependsOn); removed optional: true from cert-manager-issuers; updated snapshot-controller.dependsOn from ["cilium"] to ["cilium","cert-manager-issuers"]. |
Sequence Diagram
sequenceDiagram
participant Bundle as Bundle controller
participant Cilium as cilium
participant Issuers as cert-manager-issuers
participant CRD as cozystack-resource-definition-crd
participant Definitions as cozystack-resource-definitions
participant Snapshot as snapshot-controller
rect rgb(240,255,240)
Bundle->>Cilium: deploy (dependency)
Bundle->>Issuers: deploy (now required)
Bundle->>CRD: deploy (new release)
CRD->>Definitions: ensure CRD present -> Definitions deploy
Cilium->>Snapshot: ready
Issuers->>Snapshot: ready
Snapshot->>Bundle: deploy (dependsOn: cilium, cert-manager-issuers)
end
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
- Single YAML manifest edited; additions follow existing patterns.
- Spot-check:
packages/core/platform/bundles/distro-full.yaml(new releases,optionalremoval,dependsOnupdate).
Possibly related PRs
- cozystack/cozystack#1056 — modifies
snapshot-controller.dependsOnin the same file (opposite change regardingcert-manager-issuers). - cozystack/cozystack#391 — also touches
packages/core/platform/bundles/distro-full.yamland optional/dependency handling forcert-manager-issuers.
Suggested reviewers
- kvaps
- lllamnyp
Poem
🐰 I hopped through YAML with a cheerful spin,
Two cozy releases tucked neatly in,
Certs now required, no optional plea,
Snapshot waits for both—and winks at me,
A quiet deploy, and tea for three.
Pre-merge checks and finishing touches
✅ 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 missing components (cozystack-resource-definition-crd and cozystack-resource-definitions releases) to the distro-full bundle configuration. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
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 @coderabbitai help to get the list of available commands and usage tips.
Hi @LoneExile , thanks for your contribution! We plan to deprecate the concept of bundles, so we'll need some extra time to discuss this patch among the maintainers. I'll try to give feedback by next week.
Thank you for waiting here, this OR probably will be suppressed by #1641
Until that, let's merge it. @LoneExile could you please fix DCO:
git rebase --signoff <commit-hash> # substitute your commits
git push -f
@kvaps Done! I've rebased the commits with --signoff. Ready for merge when you are. Thanks!