Skip to main content

Neo4j Knowledge Graph

Neo4j is optional graph storage for entity and relationship data. PostgreSQL remains the application database.

Enable the chart-managed Neo4j service:

helm upgrade news-dashboard ./helm/news-dashboard \
--reuse-values \
--set neo4j.enabled=true \
--set-string neo4j.auth.password='replace-with-a-long-random-password'

For externally managed credentials, create a Secret containing both the app password key and NEO4J_AUTH for the Neo4j container:

kubectl create secret generic news-dashboard-neo4j-auth \
--from-literal=NEO4J_PASSWORD='replace-with-a-long-random-password' \
--from-literal=NEO4J_AUTH='neo4j/replace-with-a-long-random-password'

Then install with:

helm upgrade news-dashboard ./helm/news-dashboard \
--reuse-values \
--set neo4j.enabled=true \
--set neo4j.auth.existingSecret=news-dashboard-neo4j-auth

Useful values:

ValuePurpose
neo4j.enabledRenders the Neo4j StatefulSet, Service, Secret, and storage.
neo4j.auth.userNeo4j username, default neo4j.
neo4j.auth.passwordChart-managed password; prefer a secret override in production.
neo4j.auth.existingSecretExisting Secret for credentials.
neo4j.persistence.sizePVC size when using chart-managed storage.
neo4j.persistence.existingClaimExisting PVC name.
neo4j.persistence.hostPathSingle-node host path storage.

After enabling Neo4j, backfill existing cached entities:

news-dashboard graph-backfill --limit 250 --days 30
news-dashboard graph-relationship-backfill --limit 50 --days 7