test(ci): #2601 rebased on flux-bump-v048 [do not merge] - #2611
test(ci): #2601 rebased on flux-bump-v048 [do not merge]#2611myasnikovdaniil wants to merge 11 commits into
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Summary of ChangesHello, 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
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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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` | |||
There was a problem hiding this comment.
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
- 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/` |
There was a problem hiding this comment.
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.
| Run: `ls /home/daniil/aenix/cozystack-split-seaweedfs/packages/system/seaweedfs-db/` | |
| Run: `ls packages/system/seaweedfs-db/` |
| ## @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: "" |
There was a problem hiding this comment.
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: {}
CI test only — do not merge.
Rebases #2601 (
split-seaweedfs-db) on top offlux-bump-v048to validate that the seaweedfs-db split works against Flux 2.8.0 / flux-operator v0.48.0.flux-bump-v048(so the diff isolates refactor(seaweedfs): split seaweedfs-system into seaweedfs-db + seaweedfs-system #2601's changes)test-2601-on-flux-bump-v048— 11 commits from refactor(seaweedfs): split seaweedfs-system into seaweedfs-db + seaweedfs-system #2601 cherry-picked cleanly (no conflicts)Will be deleted after CI completes.