Chore: Fix helm chart
This commit is contained in:
parent
14c5a306b3
commit
fb4796204a
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