Skip to content

Add chia-db-pull init container feature for ChiaNodes#335

Merged
Starttoaster merged 5 commits into
mainfrom
init-db-pull
May 7, 2026
Merged

Add chia-db-pull init container feature for ChiaNodes#335
Starttoaster merged 5 commits into
mainfrom
init-db-pull

Conversation

@Starttoaster
Copy link
Copy Markdown
Contributor

@Starttoaster Starttoaster commented May 7, 2026

Note

Medium Risk
Adds new CRD surface area and changes ChiaNode reconciliation to inject and validate an init container, which can block node rollout if misconfigured. Limited security impact, but touches core controller behavior and manifests.

Overview
Adds first-class spec.chiaDBPull support to ChiaNode, enabling an optional chia-db-pull init container that preloads the blockchain DB from an S3-compatible bucket into CHIA_ROOT before the main container starts.

The controller now validates chiaDBPull.s3Prefix when enabled, appends the init container after any user-provided spec.initContainers, and derives the NETWORK env from spec.chiaDBPull.network or the surrounding chia network config.

Plumbs a default chia-db-pull image/tag through build tooling (build.yml, Dockerfile, Makefile ldflags), updates CRD/schema + generated deep-copies, and adds unit/integration tests plus documentation for the new config.

Reviewed by Cursor Bugbot for commit fb95f60. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 027292e. Configure here.

Comment thread .github/workflows/build.yml
Comment thread docs/chianode.md Outdated
@Starttoaster Starttoaster enabled auto-merge (squash) May 7, 2026 21:03
@Starttoaster Starttoaster merged commit bae5ddb into main May 7, 2026
16 checks passed
@Starttoaster Starttoaster deleted the init-db-pull branch May 7, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants