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/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
mise.toml
|
mise.toml
|
||||||
|
deployment/helm/values-local.yml
|
||||||
|
|
||||||
# Spyder project settings
|
# Spyder project settings
|
||||||
.spyderproject
|
.spyderproject
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
# cognee-infra-helm
|
# Example helm chart
|
||||||
General infrastructure setup for Cognee on Kubernetes using a Helm chart.
|
Example Helm chart fro Cognee with PostgreSQL and pgvector extension
|
||||||
|
It is not ready for production usage
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
Before deploying the Helm chart, ensure the following prerequisites are met:
|
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.
|
Clone the Repository Clone this repository to your local machine and navigate to the directory.
|
||||||
|
|
||||||
## Deploy Helm Chart:
|
## Example deploy Helm Chart:
|
||||||
|
|
||||||
```bash
|
```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**:
|
**Uninstall Helm Release**:
|
||||||
```bash
|
```bash
|
||||||
helm uninstall cognee
|
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:
|
ports:
|
||||||
- containerPort: {{ .Values.cognee.port }}
|
- containerPort: {{ .Values.cognee.port }}
|
||||||
env:
|
env:
|
||||||
|
- name: ENABLE_BACKEND_ACCESS_CONTROL
|
||||||
|
value: "false"
|
||||||
- name: HOST
|
- name: HOST
|
||||||
value: {{ .Values.cognee.env.HOST }}
|
value: {{ .Values.cognee.env.HOST }}
|
||||||
- name: ENVIRONMENT
|
- name: ENVIRONMENT
|
||||||
value: {{ .Values.cognee.env.ENVIRONMENT }}
|
value: {{ .Values.cognee.env.ENVIRONMENT }}
|
||||||
- name: PYTHONPATH
|
- name: PYTHONPATH
|
||||||
value: {{ .Values.cognee.env.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:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: {{ .Values.cognee.resources.cpu }}
|
cpu: {{ .Values.cognee.resources.cpu }}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ metadata:
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Release.Name }}-cognee
|
app: {{ .Release.Name }}-cognee
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.cognee.port }}
|
- port: {{ .Values.cognee.port }}
|
||||||
targetPort: {{ .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"
|
HOST: "0.0.0.0"
|
||||||
ENVIRONMENT: "local"
|
ENVIRONMENT: "local"
|
||||||
PYTHONPATH: "."
|
PYTHONPATH: "."
|
||||||
|
LLM_MODEL: "openai/gpt-4o-mini"
|
||||||
|
LLM_PROVIDER: "openai"
|
||||||
resources:
|
resources:
|
||||||
cpu: "4.0"
|
cpu: "4.0"
|
||||||
memory: "8Gi"
|
memory: "2Gi"
|
||||||
|
|
||||||
# Configuration for the 'postgres' database service
|
# Configuration for the 'postgres' database service
|
||||||
postgres:
|
postgres:
|
||||||
|
|
@ -19,4 +21,4 @@ postgres:
|
||||||
POSTGRES_USER: "cognee"
|
POSTGRES_USER: "cognee"
|
||||||
POSTGRES_PASSWORD: "cognee"
|
POSTGRES_PASSWORD: "cognee"
|
||||||
POSTGRES_DB: "cognee_db"
|
POSTGRES_DB: "cognee_db"
|
||||||
storage: "8Gi"
|
storage: "2Gi"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue