Skip to content

Fix: Add missing components to distro-full bundle - #1620

Merged
Andrei Kvapil (kvaps) merged 2 commits into
cozystack:mainfrom
LoneExile:fixed-bundle-distro-full-missing-component
Dec 9, 2025
Merged

Fix: Add missing components to distro-full bundle#1620
Andrei Kvapil (kvaps) merged 2 commits into
cozystack:mainfrom
LoneExile:fixed-bundle-distro-full-missing-component

Conversation

@LoneExile

@LoneExile Apinant.u (LoneExile) commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

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:

  1. CozystackResourceDefinition CRD missing
    - cozystack-controller pod: CrashLoopBackOff
    - lineage-controller-webhook pods: CrashLoopBackOff
    - Error: no matches for kind "CozystackResourceDefinition" in version "cozystack.io/v1alpha1"

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.4
name: cozystackresourcedefinitions.cozystack.io
spec:
group: cozystack.io
names:
kind: CozystackResourceDefinition
listKind: CozystackResourceDefinitionList
plural: cozystackresourcedefinitions
singular: cozystackresourcedefinition

  1. 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

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-cluster-issuer
spec:
selfSigned: {}

{{- if not (lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" "cozy-cert-manager" "cert-manager-issuers") }}
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-cluster-issuer
spec:
selfSigned: {}
{{- end }}

  1. 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 issuer components required during deployment (no longer optional).
    • Adjusted snapshot controller startup order to wait for certificate issuers, improving startup reliability.

✏️ Tip: You can customize this high-level summary in your review settings.

@dosubot dosubot Bot added the size/S This PR changes 10-29 lines, ignoring generated files label Nov 10, 2025
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello Apinant.u (@LoneExile), I'm Gemini Code Assist1! 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-full bundle has been updated to include previously missing critical components, resolving installation failures.
  • Missing CRD Added: The CozystackResourceDefinition CRD and its associated definitions are now included, preventing cozystack-controller and lineage-controller-webhook pods from crashing.
  • ClusterIssuer Dependency Resolved: The selfsigned-cluster-issuer ClusterIssuer is now properly provisioned by making cert-manager-issuers a mandatory component and adding it as a dependency for the snapshot-controller, fixing snapshot-validation-webhook and snapshot-controller installation 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 (@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 👍 and 👎 on Gemini (@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.

Footnotes

  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.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request correctly identifies and fixes several critical missing components and dependency issues in the distro-full bundle. Adding cozystack-resource-definition-crd and cozystack-resource-definitions resolves the pod failures related to the missing CozystackResourceDefinition CRD. Making cert-manager-issuers non-optional and adding it as a dependency for snapshot-controller correctly addresses the cascading failures in snapshot-controller and other dependent services.

I have one critical suggestion regarding a potential dependency cycle with cozystack-controller. Additionally, based on the PR description, the lineage-controller-webhook also fails due to the missing CRD. You might need to add cozystack-resource-definition-crd to its dependsOn list as well to fully resolve the startup issues.

releaseName: cozystack-resource-definition-crd
chart: cozystack-resource-definition-crd
namespace: cozy-system
dependsOn: [cilium,cozystack-controller]

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.

critical

Based on the pull request description, the cozystack-controller enters a CrashLoopBackOff state because the CozystackResourceDefinition CRD is missing. This indicates that cozystack-controller depends on cozystack-resource-definition-crd, not the other way around. By making cozystack-resource-definition-crd depend on cozystack-controller, you are introducing a circular dependency that will prevent either component from starting correctly.

To fix this, you should remove cozystack-controller from this dependsOn list. It is also highly recommended to update the cozystack-controller release definition (outside the scope of this diff) to explicitly depend on cozystack-resource-definition-crd to ensure the correct installation order.

  dependsOn: [cilium]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

right!

@dosubot dosubot Bot added the kind/bug Categorizes issue or PR as related to a bug label Nov 10, 2025
@coderabbitai

coderabbitai Bot commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

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
Loading

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, optional removal, dependsOn update).

Possibly related PRs

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.

❤️ Share

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

@lllamnyp

Copy link
Copy Markdown
Member

Hi Apinant.u (@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.

@kvaps

Copy link
Copy Markdown
Member

Thank you for waiting here, this OR probably will be suppressed by #1641

Until that, let's merge it. Apinant.u (@LoneExile) could you please fix DCO:

git rebase --signoff <commit-hash> # substitute your commits
git push -f

@LoneExile
Apinant.u (LoneExile) force-pushed the fixed-bundle-distro-full-missing-component branch from 4c08bc6 to e0cc093 Compare December 5, 2025 15:12
@dosubot dosubot Bot added size/L This PR changes 100-499 lines, ignoring generated files and removed size/S This PR changes 10-29 lines, ignoring generated files labels Dec 5, 2025
Signed-off-by: Apinant U-suwantim <Hello@Apinant.dev>
Signed-off-by: Apinant U-suwantim <Hello@Apinant.dev>
@LoneExile
Apinant.u (LoneExile) force-pushed the fixed-bundle-distro-full-missing-component branch from e0cc093 to 0a93972 Compare December 5, 2025 15:15
@dosubot dosubot Bot added size/S This PR changes 10-29 lines, ignoring generated files and removed size/L This PR changes 100-499 lines, ignoring generated files labels Dec 5, 2025
@LoneExile

Copy link
Copy Markdown
Contributor Author

Andrei Kvapil (@kvaps) Done! I've rebased the commits with --signoff. Ready for merge when you are. Thanks!

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/core/platform/bundles/distro-full.yaml (1)

71-75: Verify whether lineage-controller-webhook also needs cozystack-resource-definition-crd dependency.

The PR objectives mention that both cozystack-controller and lineage-controller-webhook enter CrashLoopBackOff due to the missing CozystackResourceDefinition CRD. However, lineage-controller-webhook (line 71–75) does not depend on cozystack-resource-definition-crd, only on [cozystack-controller,cilium,cert-manager].

If lineage-controller-webhook also consumes the CRD, it should explicitly depend on cozystack-resource-definition-crd to ensure correct installation order.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d59dc6 and 0a93972.

📒 Files selected for processing (1)
  • packages/core/platform/bundles/distro-full.yaml (2 hunks)
🔇 Additional comments (3)
packages/core/platform/bundles/distro-full.yaml (3)

95-99: Approved: cert-manager-issuers and snapshot-controller dependency updates.

The removal of optional: true from cert-manager-issuers and the addition of cert-manager-issuers to snapshot-controller's dependencies align well with the PR objective to provide the missing selfsigned-cluster-issuer. This ensures proper installation order and availability of the TLS secret that snapshot-controller requires.

Also applies to: 214-218


60-69: Incomplete dependency fix: cozystack-controller should depend on cozystack-resource-definition-crd.

Per the PR objectives, cozystack-controller crashes with CrashLoopBackOff because the CozystackResourceDefinition CRD is missing. While the PR adds the CRD release, cozystack-controller (line 60–69) does not explicitly depend on cozystack-resource-definition-crd. This means cozystack-controller could still be installed before the CRD, potentially reproducing the original crash.

The past review comment (from gemini-code-assist[bot]) already recommended this fix: "It is also highly recommended to update the cozystack-controller release definition... to explicitly depend on cozystack-resource-definition-crd."

Update line 64 to:

-  dependsOn: [cilium]
+  dependsOn: [cilium,cozystack-resource-definition-crd]

77-87: Clarify chart naming: Are cozystack-resource-definition-crd and cozystack-resource-definitions intentionally unprefixed?

The two newly added releases deviate from the cozy- prefix pattern used by all other charts in this bundle (e.g., cozy-fluxcd-operator, cozy-cilium, cozy-cert-manager-issuers). Confirm whether this naming is intentional or if these should align with the established convention.

@kvaps Andrei Kvapil (kvaps) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Dec 9, 2025
@kvaps
Andrei Kvapil (kvaps) merged commit 19586e1 into cozystack:main Dec 9, 2025
22 checks passed
Andrei Kvapil (kvaps) added a commit that referenced this pull request Jan 8, 2026
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:

  1. 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

  2. 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

  3. Cascading failures
    - linstor HelmRelease: Blocked (depends on snapshot-controller)
    



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added two new resource-definition components to the platform
distribution for enhanced configuration management.

* **Improvements**
* Made certificate issuer components required during deployment (no
longer optional).
* Adjusted snapshot controller startup order to wait for certificate
issuers, improving startup reliability.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Andrei Kvapil (kvaps) added a commit that referenced this pull request Jan 8, 2026
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:

  1. 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

  2. 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

  3. Cascading failures
    - linstor HelmRelease: Blocked (depends on snapshot-controller)
    



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added two new resource-definition components to the platform
distribution for enhanced configuration management.

* **Improvements**
* Made certificate issuer components required during deployment (no
longer optional).
* Adjusted snapshot controller startup order to wait for certificate
issuers, improving startup reliability.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Andrei Kvapil (kvaps) added a commit that referenced this pull request Jan 9, 2026
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:

  1. 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

  2. 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

  3. Cascading failures
    - linstor HelmRelease: Blocked (depends on snapshot-controller)
    



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added two new resource-definition components to the platform
distribution for enhanced configuration management.

* **Improvements**
* Made certificate issuer components required during deployment (no
longer optional).
* Adjusted snapshot controller startup order to wait for certificate
issuers, improving startup reliability.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug lgtm This PR has been approved by a maintainer size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants