-
Notifications
You must be signed in to change notification settings - Fork 15
feat(graph-node): add pg and ipfs charts as dependency #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis change introduces optional Helm chart dependencies for PostgreSQL and IPFS Cluster into the Changes
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
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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 (6)
charts/graph-node/Chart.yaml (1)
37-37
: Missing newline at end of file.Add a newline at the end of the file to comply with YAML best practices and fix the linting error.
repository: https://ethpandaops.github.io/ethereum-helm-charts condition: ipfs-cluster.enabled +
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
charts/graph-node/values.yaml (1)
309-309
: Add newline at end of file
YAMLLint flagged a missing newline at EOF. Consider adding a trailing newline for compliance with YAML best practices.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 309-309: no new line character at the end of file
(new-line-at-end-of-file)
charts/graph-node/templates/graph-node/all.yaml (4)
124-132
: Defaults for PGHOST, PGDATABASE, and IPFS in initContainer env
The conditional blocks correctly inject fallback values when those env vars are empty. To reduce repetition, consider extracting this logic into a helper (e.g.,defaultEnvValue
) and invoking it both here and in the main container block.
136-150
: Incorporate customizable PostgreSQL secret name
The template hardcodes<Release>-postgresql
but you’ve introducedpostgresql.secretName
in values.yaml. Verify whether users should be able to override the secret name via that field; if so, use.Values.postgresql.secretName
(or thegraph-node.postgresql.secretName
helper) instead of the fixed release suffix.
250-258
: Defaults for PGHOST, PGDATABASE, and IPFS in main container env
This block mirrors the initContainer logic for environment variables, which is correct. Extracting it into a shared helper would DRY up the template and make future tweaks safer.
260-275
: SecretEnv logic duplication and helper usage
The secret‑env logic forPGUSER
/PGPASSWORD
is duplicated here. It also bypasses the newpostgresql.secretName
field. Consider refactoring into a helper (e.g.,postgresqlSecretRef
) and leveraging your_helpers.tpl
function to centralize the secret‑naming logic.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
charts/graph-node/Chart.lock
is excluded by!**/*.lock
📒 Files selected for processing (6)
charts/graph-node/Chart.yaml
(1 hunks)charts/graph-node/README.md
(1 hunks)charts/graph-node/templates/NOTES.txt
(1 hunks)charts/graph-node/templates/_helpers.tpl
(1 hunks)charts/graph-node/templates/graph-node/all.yaml
(2 hunks)charts/graph-node/values.yaml
(2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
charts/graph-node/values.yaml
[error] 309-309: no new line character at the end of file
(new-line-at-end-of-file)
charts/graph-node/Chart.yaml
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
🪛 LanguageTool
charts/graph-node/README.md
[uncategorized] ~328-~328: Possible missing article found.
Context: ...efault and will automatically configure Graph Node to use them. #### PostgreSQL Depe...
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~334-~334: Loose punctuation mark.
Context: ...ables: - PRIMARY_SUBGRAPH_DATA_PGHOST
: Defaults to <release-name>-postgresql
...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~368-~368: Loose punctuation mark.
Context: ...ollowing environment variable: - IPFS
: Defaults to `http://ipfs-...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (14)
charts/graph-node/templates/_helpers.tpl (1)
8-18
: Looks good - helper function properly determines PostgreSQL secret name.The new template function
graph-node.postgresql.secretName
correctly determines the PostgreSQL secret name, either using a user-provided value or falling back to the standard naming pattern for the PostgreSQL dependency.charts/graph-node/templates/NOTES.txt (4)
1-9
: Good installation instructions and commands.This section provides helpful post-installation guidance including commands to check the status and details of the deployment.
10-17
: Clear PostgreSQL connection information.The conditional block provides users with the necessary PostgreSQL connection details when the dependency is enabled. This helps users understand how to connect to the database.
19-24
: Clear IPFS Cluster connection information.The conditional block provides users with the necessary IPFS Cluster connection details when the dependency is enabled.
26-27
: Helpful deployment verification command.The command provided allows users to quickly verify their deployment status.
charts/graph-node/Chart.yaml (2)
18-18
: Version bump is appropriate.The chart version has been properly incremented to reflect the new feature additions.
27-37
:❓ Verification inconclusive
Dependencies are properly configured.
The PostgreSQL and IPFS Cluster dependencies are appropriately defined with proper versioning, repositories, and conditional enabling.
🏁 Script executed:
#!/bin/bash # Check if the dependency repositories are valid echo "Checking Bitnami repository..." curl -s https://charts.bitnami.com/bitnami/index.yaml | grep -A 5 "name: postgresql" echo "Checking Ethereum Helm charts repository..." curl -s https://ethpandaops.github.io/ethereum-helm-charts/index.yaml | grep -A 5 "name: ipfs-cluster"Length of output: 3378
🏁 Script executed:
#!/bin/bash echo "Searching for 'name: postgresql' entries in Bitnami index.yaml" curl -sS https://charts.bitnami.com/bitnami/index.yaml | grep -n "name: postgresql" echo "Searching for chart version 16.6.3 in Bitnami index.yaml" curl -sS https://charts.bitnami.com/bitnami/index.yaml | grep -n "version: 16.6.3"Length of output: 434
Manual Verification Required: Confirm Bitnami PostgreSQL Chart Version
I ran a check against the Bitnami index and didn’t see any entries for “name: postgresql” or “version: 16.6.3.” Please manually verify that your Chart.yaml’s PostgreSQL dependency matches an existing chart in the repo:
• File: charts/graph-node/Chart.yaml
• Lines: 27–31 (PostgreSQL dependency)If the Bitnami repo has moved to a different version, update this to the correct chart version.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 37-37: no new line character at the end of file
(new-line-at-end-of-file)
charts/graph-node/README.md (5)
326-329
: Good introduction to dependencies section.The new dependencies section clearly explains the purpose of the optional dependencies.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~328-~328: Possible missing article found.
Context: ...efault and will automatically configure Graph Node to use them. #### PostgreSQL Depe...(AI_HYDRA_LEO_MISSING_THE)
330-340
: Clear documentation for PostgreSQL dependency.The PostgreSQL dependency section explains what environment variables are automatically configured, which is valuable information for users.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~334-~334: Loose punctuation mark.
Context: ...ables: -PRIMARY_SUBGRAPH_DATA_PGHOST
: Defaults to<release-name>-postgresql
...(UNLIKELY_OPENING_PUNCTUATION)
341-362
: Helpful PostgreSQL configuration example.The example configuration provides a good starting point for users who want to customize their PostgreSQL deployment.
364-371
: Clear documentation for IPFS Cluster dependency.The IPFS Cluster dependency section explains what environment variable is automatically configured.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~368-~368: Loose punctuation mark.
Context: ...ollowing environment variable: -IPFS
: Defaults to `http://ipfs-...(UNLIKELY_OPENING_PUNCTUATION)
372-378
: Helpful IPFS Cluster configuration example.The example configuration provides a good starting point for users who want to customize their IPFS Cluster deployment.
charts/graph-node/values.yaml (2)
162-164
: Approve updated secretEnv comments
The added comments clearly explain the fallback behavior forPRIMARY_SUBGRAPH_DATA_PGUSER
andPRIMARY_SUBGRAPH_DATA_PGPASSWORD
when no secret is provided, improving value‑file documentation.Also applies to: 168-170
284-309
: Verify Chart.yaml dependencies for new sections
You’ve introducedipfs-cluster
andpostgresql
blocks here, but we haven’t seen the corresponding entries incharts/graph-node/Chart.yaml
. Please confirm that those charts are declared as optional dependencies (disabled by default) in Chart.yaml so these values take effect.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 309-309: no new line character at the end of file
(new-line-at-end-of-file)
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
Documentation
Refactor