feat(graph-node): add pg and ipfs charts as dependency
Hey this PR adds Postgres and ipfs as optional dependencies to make it easier to get started with Graph Node. Both dependencies are disabled by default, so this change is fully backward compatible with existing deployments. The idea is to provide a quick-start option where users can deploy a complete Graph Node setup with a single Helm command
Summary by CodeRabbit
-
New Features
- Added support for optional PostgreSQL and IPFS Cluster dependencies in the Helm chart, allowing users to enable or disable these components during deployment.
- Introduced post-installation instructions and connection details for dependencies, improving deployment guidance.
-
Documentation
- Expanded README with a new "Dependencies" section, including configuration examples and environment variable details for PostgreSQL and IPFS Cluster.
- Enhanced comments in configuration values for clarity on default behaviors and overrides.
-
Refactor
- Improved handling of environment variables by providing sensible defaults when values are not explicitly set.
Walkthrough
This change introduces optional Helm chart dependencies for PostgreSQL and IPFS Cluster into the graph-node Helm chart, updating the chart version and adding related documentation. Conditional logic is added to the templates to provide default environment variable values for database and IPFS connection parameters when not explicitly set. A new NOTES.txt template is included to display post-installation connection details, and a helper template is added to determine the PostgreSQL secret name. The values file is updated with new configuration sections and expanded documentation for these dependencies.
Changes
| File(s) | Change Summary |
|---|---|
charts/graph-node/Chart.yaml |
Chart version incremented to 0.5.10. Added dependencies section for optional PostgreSQL (Bitnami) and IPFS Cluster (Ethereum Helm charts) dependencies, each with alias and enable condition. |
charts/graph-node/README.md |
Added a "Dependencies" section documenting the new PostgreSQL and IPFS Cluster dependencies, their default environment variable handling, and example configuration snippets for enabling and customizing these dependencies. |
charts/graph-node/templates/NOTES.txt |
New template providing post-installation instructions, including conditional connection details for PostgreSQL and IPFS Cluster if enabled. |
charts/graph-node/templates/_helpers.tpl |
Added a new Helm template helper graph-node.postgresql.secretName to determine the PostgreSQL secret name based on values or defaults. |
charts/graph-node/templates/graph-node/all.yaml |
Enhanced template logic to provide default values for PostgreSQL and IPFS-related environment variables when keys are present but empty. Logic applies to both init and main containers, handling both regular and secret environment variables. No structural changes to manifests. |
charts/graph-node/values.yaml |
Expanded comments for secret environment variables to clarify defaulting behavior. Added configuration sections for ipfs-cluster and postgresql dependencies, including enable flags, resource limits, and extended configuration. Defaults set to not enable dependencies unless specified. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Helm Chart
participant PostgreSQL Dependency
participant IPFS Cluster Dependency
participant Kubernetes
User->>Helm Chart: Install/upgrade graph-node chart
Helm Chart-->>Kubernetes: Deploy graph-node resources
alt postgresql.enabled = true
Helm Chart-->>PostgreSQL Dependency: Deploy PostgreSQL subchart
PostgreSQL Dependency-->>Kubernetes: Deploy PostgreSQL resources
Helm Chart-->>Kubernetes: Set env vars for DB connection (defaults if not set)
end
alt ipfs-cluster.enabled = true
Helm Chart-->>IPFS Cluster Dependency: Deploy IPFS Cluster subchart
IPFS Cluster Dependency-->>Kubernetes: Deploy IPFS Cluster resources
Helm Chart-->>Kubernetes: Set env var for IPFS endpoint (default if not set)
end
Helm Chart-->>Kubernetes: Deploy NOTES.txt with connection info
User->>Kubernetes: Inspect deployment and notes
Suggested reviewers
- calinah
[!TIP]
⚡💬 Agentic Chat (Pro Plan, General Availability)
- We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
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.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>, please review it. -
Generate unit testing code for this file. -
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file. -
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase. -
@coderabbitai read src/utils.ts and generate unit testing code. -
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format. -
@coderabbitai help me debug CodeRabbit configuration file.
-
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
-
@coderabbitai pauseto pause the reviews on a PR. -
@coderabbitai resumeto resume the paused reviews. -
@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai full reviewto do a full review from scratch and review all the files again. -
@coderabbitai summaryto regenerate the summary of the PR. -
@coderabbitai generate docstringsto generate docstrings for this PR. -
@coderabbitai resolveresolve all the CodeRabbit review comments. -
@coderabbitai configurationto show the current CodeRabbit configuration for the repository. -
@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.