Skip to content

test(ci): #2601 rebased on flux-bump-v048 [do not merge] - #2611

Closed
myasnikovdaniil wants to merge 11 commits into
flux-bump-v048from
test-2601-on-flux-bump-v048
Closed

test(ci): #2601 rebased on flux-bump-v048 [do not merge]#2611
myasnikovdaniil wants to merge 11 commits into
flux-bump-v048from
test-2601-on-flux-bump-v048

Conversation

@myasnikovdaniil

Copy link
Copy Markdown
Contributor

CI test only — do not merge.

Rebases #2601 (split-seaweedfs-db) on top of flux-bump-v048 to validate that the seaweedfs-db split works against Flux 2.8.0 / flux-operator v0.48.0.

Will be deleted after CI completes.

Design for fixing the EPERM crashloop race where seaweedfs-filer pods
schedule concurrently with the CNPG Cluster bootstrap and crash for ~70 s
because Cilium socket-LB returns EPERM for ClusterIPs with no Ready
endpoints. Splits the Helm release in two with Flux dependsOn and a
post-install hook gating the db release Ready on the actual Cluster
Ready condition.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Flux v2 HelmRelease has a healthCheckExprs field that gates the wait
phase (and therefore Ready) on a CEL expression evaluated against
custom resources. This is purely declarative — drops the hook Job,
ServiceAccount, RBAC, and kubectl image from the seaweedfs-db chart.
Requires spec.waitStrategy.name=poller.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
10-task plan covering: new system/seaweedfs-db chart skeleton, moving
the CNPG Cluster manifest, dropping db.* from system/seaweedfs values,
registering the new component in the seaweedfs-application source,
adding the wrapper HR with healthCheckExprs + waitStrategy poller,
adding dependsOn on the existing wrapper, and migration 39 to adopt
existing Clusters into the new release.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
…ion source

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
…uster Ready

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
…s-through

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
…e (migration 39)

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 01ebb3ac-de7c-4def-8927-714afc49d975

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test-2601-on-flux-bump-v048

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.

@github-actions github-actions Bot added the area/ci Issues or PRs related to CI workflows, GitHub Actions, automation label May 12, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 a race condition where seaweedfs-filer pods fail to start due to the database not being ready. By decoupling the database lifecycle from the application workloads, we leverage Flux's dependency management and custom health checks to ensure proper startup ordering. This change improves reliability during fresh installs and upgrades while maintaining backward compatibility through a migration script.

Highlights

  • Architecture Refactoring: Split the seaweedfs-system HelmRelease into two separate releases: seaweedfs-db (containing the CNPG Cluster) and seaweedfs-system (containing the application workloads).
  • Race Condition Resolution: Implemented a readiness gate using HelmRelease.spec.healthCheckExprs and waitStrategy: poller to ensure the seaweedfs-filer pods only schedule after the CNPG database is fully Ready, eliminating EPERM crashloops.
  • Dependency Management: Configured seaweedfs-system to depend on seaweedfs-db and reduced the reconciliation interval to 30s to ensure fast deployment sequencing.
  • Migration Strategy: Added a migration script (migration 39) to re-annotate existing CNPG Cluster resources, allowing the new seaweedfs-db release to adopt them without disruption.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 the 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 counterproductive. 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.

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.

@github-actions github-actions Bot added the size/XXL This PR changes 1000+ lines, ignoring generated files label May 12, 2026
@dosubot dosubot Bot added area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress labels May 12, 2026

@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 implements a split of the seaweedfs-system HelmRelease into two separate releases: seaweedfs-db (containing the CNPG Cluster) and a slimmed-down seaweedfs-system (containing the application workloads). This change introduces a readiness gate using healthCheckExprs and dependsOn to ensure the database is fully ready before the SeaweedFS application starts, preventing EPERM connection errors during fresh installs. The PR includes a new system package, wrapper templates, and a migration script (migration 39) to handle existing clusters. Feedback includes a requirement to add a release-note block to the PR description per the style guide, a suggestion to remove absolute local paths from the implementation plan, and a recommendation to include the resources field in the new database values schema to match the wrapper template usage.

@@ -0,0 +1,178 @@
# Split `seaweedfs-system` HelmRelease into `seaweedfs-db` + `seaweedfs-system`

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.

low

The pull request description is missing the required release-note block as specified in the Repository Style Guide (lines 51-57). Please add a release note block to the PR description to ensure it can be merged and correctly processed for the changelog.

References
  1. PR body must contain a release note block in the specified format. (link)


- [ ] **Step 3: Verify directory structure**

Run: `ls /home/daniil/aenix/cozystack-split-seaweedfs/packages/system/seaweedfs-db/`

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.

low

The implementation plan contains hardcoded absolute paths (e.g., /home/daniil/aenix/...). These should be replaced with relative paths or generic placeholders to ensure the plan is reusable and not dependent on a specific local environment. This applies to multiple locations throughout the document.

Suggested change
Run: `ls /home/daniil/aenix/cozystack-split-seaweedfs/packages/system/seaweedfs-db/`
Run: `ls packages/system/seaweedfs-db/`

Comment on lines +9 to +18
## @typedef {struct} DB - Database configuration.
## @field {int} [replicas] - Number of database replicas.
## @field {quantity} [size] - Persistent Volume size.
## @field {string} [storageClass] - StorageClass used to store the data.

## @param {DB} db - Database configuration.
db:
replicas: 2
size: 10Gi
storageClass: ""

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.

low

The DB typedef and the db values block are missing the resources field, which is being passed by the wrapper template in packages/extra/seaweedfs/templates/seaweedfs-db.yaml. Adding it here will ensure it is documented and included in the generated schema.

## @typedef {struct} DB - Database configuration.
## @field {int} [replicas] - Number of database replicas.
## @field {quantity} [size] - Persistent Volume size.
## @field {string} [storageClass] - StorageClass used to store the data.
## @field {Resources} [resources] - Resource configuration.

## @param {DB} db - Database configuration.
db:
  replicas: 2
  size: 10Gi
  storageClass: ""
  resources: {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Issues or PRs related to CI workflows, GitHub Actions, automation area/platform Issues or PRs related to platform infrastructure (bundle, flux, talos, installer) area/storage Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor) do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress size/XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant