Chore: Update helm chart (#1984)
<!-- .github/pull_request_template.md -->
## Description
Updated example Helm chart:
* connected PostgreSQL + pgvector to Cognee
* Added required variables and secrets
* Tested with port forwarding
* Updated readme
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->
## Acceptance Criteria
<!--
* Key requirements to the new feature or modification;
* Proof that the changes work and meet the requirements;
* Include instructions on how to verify the changes. Describe how to
test it locally;
* Proof that it's sufficiently tested.
-->
## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [x] Other (please specify): Cloud
## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->
## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages
## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Updated deployment guide with example setup instructions, deployment
commands, and port forwarding details for local access.
* **Configuration**
* Added LLM model and provider configuration settings.
* Enhanced deployment with environment variables and memory resource
limits.
* Implemented secure secret management for API keys.
* Adjusted resource allocations for services.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
commit
7a421dd968
6 changed files with 50 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -148,6 +148,7 @@ ENV/
|
|||
env.bak/
|
||||
venv.bak/
|
||||
mise.toml
|
||||
deployment/helm/values-local.yml
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
# cognee-infra-helm
|
||||
General infrastructure setup for Cognee on Kubernetes using a Helm chart.
|
||||
# Example helm chart
|
||||
Example Helm chart fro Cognee with PostgreSQL and pgvector extension
|
||||
It is not ready for production usage
|
||||
|
||||
## Prerequisites
|
||||
Before deploying the Helm chart, ensure the following prerequisites are met:
|
||||
|
|
@ -13,13 +14,22 @@ Before deploying the Helm chart, ensure the following prerequisites are met:
|
|||
|
||||
Clone the Repository Clone this repository to your local machine and navigate to the directory.
|
||||
|
||||
## Deploy Helm Chart:
|
||||
## Example deploy Helm Chart:
|
||||
|
||||
```bash
|
||||
helm install cognee ./cognee-chart
|
||||
helm upgrade --install cognee deployment/helm \
|
||||
--namespace cognee --create-namespace \
|
||||
--set cognee.env.LLM_API_KEY="$YOUR_KEY"
|
||||
```
|
||||
|
||||
**Uninstall Helm Release**:
|
||||
```bash
|
||||
helm uninstall cognee
|
||||
```
|
||||
|
||||
## Port forwarding
|
||||
To access cognee, run
|
||||
```
|
||||
kubectl port-forward svc/cognee-service -n cognee 8000
|
||||
```
|
||||
it will be available at localhost:8000
|
||||
|
|
|
|||
|
|
@ -20,12 +20,35 @@ spec:
|
|||
ports:
|
||||
- containerPort: {{ .Values.cognee.port }}
|
||||
env:
|
||||
- name: ENABLE_BACKEND_ACCESS_CONTROL
|
||||
value: "false"
|
||||
- name: HOST
|
||||
value: {{ .Values.cognee.env.HOST }}
|
||||
- name: ENVIRONMENT
|
||||
value: {{ .Values.cognee.env.ENVIRONMENT }}
|
||||
- name: PYTHONPATH
|
||||
value: {{ .Values.cognee.env.PYTHONPATH }}
|
||||
- name: VECTOR_DB_PROVIDER
|
||||
value: pgvector
|
||||
- name: DB_HOST
|
||||
value: {{ .Release.Name }}-postgres
|
||||
- name: DB_PORT
|
||||
value: "{{ .Values.postgres.port }}"
|
||||
- name: DB_NAME
|
||||
value: {{ .Values.postgres.env.POSTGRES_DB }}
|
||||
- name: DB_USERNAME
|
||||
value: {{ .Values.postgres.env.POSTGRES_USER }}
|
||||
- name: DB_PASSWORD
|
||||
value: {{ .Values.postgres.env.POSTGRES_PASSWORD }}
|
||||
- name: LLM_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-llm-api-key
|
||||
key: LLM_API_KEY
|
||||
- name: LLM_MODEL
|
||||
value: {{ .Values.cognee.env.LLM_MODEL }}
|
||||
- name: LLM_PROVIDER
|
||||
value: {{ .Values.cognee.env.LLM_PROVIDER }}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ .Values.cognee.resources.cpu }}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ metadata:
|
|||
labels:
|
||||
app: {{ .Release.Name }}-cognee
|
||||
spec:
|
||||
type: NodePort
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: {{ .Values.cognee.port }}
|
||||
targetPort: {{ .Values.cognee.port }}
|
||||
|
|
|
|||
7
deployment/helm/templates/secrets.yml
Normal file
7
deployment/helm/templates/secrets.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-llm-api-key
|
||||
type: Opaque
|
||||
data:
|
||||
LLM_API_KEY: {{ .Values.cognee.env.LLM_API_KEY | b64enc | quote }}
|
||||
|
|
@ -7,9 +7,11 @@ cognee:
|
|||
HOST: "0.0.0.0"
|
||||
ENVIRONMENT: "local"
|
||||
PYTHONPATH: "."
|
||||
LLM_MODEL: "openai/gpt-4o-mini"
|
||||
LLM_PROVIDER: "openai"
|
||||
resources:
|
||||
cpu: "4.0"
|
||||
memory: "8Gi"
|
||||
memory: "2Gi"
|
||||
|
||||
# Configuration for the 'postgres' database service
|
||||
postgres:
|
||||
|
|
@ -19,4 +21,4 @@ postgres:
|
|||
POSTGRES_USER: "cognee"
|
||||
POSTGRES_PASSWORD: "cognee"
|
||||
POSTGRES_DB: "cognee_db"
|
||||
storage: "8Gi"
|
||||
storage: "2Gi"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue