Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
26 changes: 13 additions & 13 deletions helm-charts/QUICKSTART.md → charts/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ kubectl expose pod postgres --port=5432 --target-port=5432

```bash
# Install with PostgreSQL connection
helm install alphatrion ./helm-charts/alphatrion \
-f ./helm-charts/alphatrion/values-dev.yaml \
helm install alphatrion ./charts/alphatrion \
-f ./charts/alphatrion/values-dev.yaml \
--set postgresql.host=postgres \
--set postgresql.password=alphatr1on
```
Expand Down Expand Up @@ -101,10 +101,10 @@ If you want to enable tracing support with ClickHouse, you have two options:

```bash
# 1. Create gp3 storage class (AWS only)
kubectl apply -f ./helm-charts/clickhouse/storageclass-gp3.yaml
kubectl apply -f ./charts/clickhouse/storageclass-gp3.yaml

# 2. Deploy single-node ClickHouse
kubectl apply -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-statefulset.yaml

# 3. Verify
kubectl get pods -n alphatrion -l app=clickhouse
Expand All @@ -117,22 +117,22 @@ For production workloads with automatic failover and data replication:

```bash
# 1. Create gp3 storage class (AWS only)
kubectl apply -f ./helm-charts/clickhouse/storageclass-gp3.yaml
kubectl apply -f ./charts/clickhouse/storageclass-gp3.yaml

# 2. Deploy HA cluster (3 replicas + 3 keeper nodes)
./helm-charts/clickhouse/deploy-ha.sh
./charts/clickhouse/deploy-ha.sh

# Or manually:
kubectl apply -f ./helm-charts/clickhouse/clickhouse-ha.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-ha.yaml
```

See [HA Setup Guide](./clickhouse/HA-SETUP.md) for detailed instructions and migration guide.

### Connect AlphaTrion to ClickHouse

```bash
helm upgrade alphatrion ./helm-charts/alphatrion \
-f ./helm-charts/alphatrion/values-with-clickhouse.yaml
helm upgrade alphatrion ./charts/alphatrion \
-f ./charts/alphatrion/values-with-clickhouse.yaml
```

For more details, see the [ClickHouse deployment guide](./clickhouse/README.md).
Expand Down Expand Up @@ -175,7 +175,7 @@ psql -h localhost -U alphatrion -d alphatrion
### Upgrade Release

```bash
helm upgrade alphatrion ./helm-charts/alphatrion -f ./helm-charts/alphatrion/values-dev.yaml
helm upgrade alphatrion ./charts/alphatrion -f ./charts/alphatrion/values-dev.yaml
```

### Uninstall
Expand Down Expand Up @@ -205,15 +205,15 @@ For production, use `values-prod.yaml` and customize it:

```bash
# Copy and customize production values
cp helm-charts/alphatrion/values-prod.yaml my-prod-values.yaml
cp charts/alphatrion/values-prod.yaml my-prod-values.yaml
# Edit my-prod-values.yaml with your PostgreSQL host and other settings

# Create secret for PostgreSQL password
kubectl create secret generic alphatrion-postgres-credentials \
--from-literal=password=your-secure-password

# Install
helm install alphatrion ./helm-charts/alphatrion -f my-prod-values.yaml
helm install alphatrion ./charts/alphatrion -f my-prod-values.yaml
```

## Troubleshooting
Expand Down Expand Up @@ -252,7 +252,7 @@ kubectl logs job/alphatrion-migration

# If you need to re-run migrations
kubectl delete job alphatrion-migration
helm upgrade alphatrion ./helm-charts/alphatrion
helm upgrade alphatrion ./charts/alphatrion
```

## Using AlphaTrion in Your Application
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions helm-charts/alphatrion/README.md → charts/alphatrion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This Helm chart deploys AlphaTrion, an open-source framework for GenAI applicati
Install the chart with your PostgreSQL configuration:

```bash
helm install alphatrion ./helm-charts/alphatrion \
helm install alphatrion ./charts/alphatrion \
--set server.image.repository=alphatrion-server \
--set server.image.tag=latest \
--set dashboard.image.repository=alphatrion-dashboard \
Expand Down Expand Up @@ -135,7 +135,7 @@ AlphaTrion requires an external PostgreSQL database (version 12 or later). You m
### Using Password (Development)

```bash
helm install alphatrion ./helm-charts/alphatrion \
helm install alphatrion ./charts/alphatrion \
--set postgresql.host=my-postgres.example.com \
--set postgresql.password=mypassword
```
Expand All @@ -152,7 +152,7 @@ kubectl create secret generic alphatrion-postgres-credentials \
Then install with the secret reference:

```bash
helm install alphatrion ./helm-charts/alphatrion \
helm install alphatrion ./charts/alphatrion \
--set postgresql.host=my-postgres.example.com \
--set postgresql.existingSecret=alphatrion-postgres-credentials
```
Expand All @@ -162,7 +162,7 @@ helm install alphatrion ./helm-charts/alphatrion \
To expose AlphaTrion via Ingress:

```bash
helm install alphatrion ./helm-charts/alphatrion \
helm install alphatrion ./charts/alphatrion \
--set ingress.enabled=true \
--set ingress.hosts[0].host=alphatrion.example.com \
--set ingress.tls[0].secretName=alphatrion-tls \
Expand Down Expand Up @@ -200,7 +200,7 @@ If you enabled ingress, visit the configured hostname (e.g., https://alphatrion.
To upgrade the release:

```bash
helm upgrade alphatrion ./helm-charts/alphatrion \
helm upgrade alphatrion ./charts/alphatrion \
-f custom-values.yaml
```

Expand Down Expand Up @@ -257,7 +257,7 @@ kubectl run postgresql-client --rm --tty -i --restart='Never' \
For advanced configuration options, see the `values.yaml` file or run:

```bash
helm show values ./helm-charts/alphatrion
helm show values ./charts/alphatrion
```

## License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ PostgreSQL password secret name
PostgreSQL password secret key
*/}}
{{- define "alphatrion.postgresql.secretKey" -}}
{{- "postgres-password" }}
{{- .Values.postgresql.existingSecretKey | default "postgres-password" }}
{{- end }}

{{/*
Expand All @@ -169,6 +169,13 @@ ClickHouse secret name
{{- end }}
{{- end }}

{{/*
ClickHouse password secret key
*/}}
{{- define "alphatrion.clickhouse.secretKey" -}}
{{- .Values.clickhouse.existingSecretKey | default "clickhouse-password" }}
{{- end }}

{{/*
Docker Registry secret name
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ spec:
valueFrom:
secretKeyRef:
name: {{ include "alphatrion.clickhouse.secretName" . }}
key: clickhouse-password
key: {{ include "alphatrion.clickhouse.secretKey" . }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ include "alphatrion.clickhouse.secretName" . }}
key: clickhouse-password
key: {{ include "alphatrion.clickhouse.secretKey" . }}
{{- end }}

envFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ postgresql:
database: alphatrion
username: alphatrion
password: ""
# Use existing secret for password (key should be 'password')
# Use existing secret for password
existingSecret: ""
# Key name in the existing secret (default: postgres-password)
existingSecretKey: "postgres-password"
# Automatically initialize database tables on first run
initTables: false

Expand All @@ -107,8 +109,10 @@ clickhouse:
database: alphatrion_traces
username: alphatrion
password: "alphatrion"
# Use existing secret for password (key should be 'password')
# Use existing secret for password
existingSecret: ""
# Key name in the existing secret (default: clickhouse-password)
existingSecretKey: "clickhouse-password"
# Automatically initialize tables
initTables: false
# Enable batch operations for better performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ This guide shows how to deploy a highly available ClickHouse cluster with 3 repl
### 1. Create gp3 Storage Class (if not exists)

```bash
kubectl apply -f ./helm-charts/clickhouse/storageclass-gp3.yaml
kubectl apply -f ./charts/clickhouse/storageclass-gp3.yaml
```

### 2. Deploy HA ClickHouse Cluster

```bash
kubectl apply -f ./helm-charts/clickhouse/clickhouse-ha.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-ha.yaml
```

This will create:
Expand Down Expand Up @@ -264,11 +264,11 @@ kubectl exec -n alphatrion clickhouse-0 -- tar -czf /tmp/backup.tar.gz /var/lib/
kubectl cp alphatrion/clickhouse-0:/tmp/backup.tar.gz ./clickhouse-backup.tar.gz

# 3. Delete single-node deployment
kubectl delete -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl delete -f ./charts/clickhouse/clickhouse-statefulset.yaml
kubectl delete pvc -n alphatrion clickhouse-data-clickhouse-0

# 4. Deploy HA cluster
kubectl apply -f ./helm-charts/clickhouse/clickhouse-ha.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-ha.yaml

# 5. Wait for cluster to be ready
kubectl wait --for=condition=ready pod -n alphatrion -l app=clickhouse --timeout=300s
Expand All @@ -285,7 +285,7 @@ kubectl exec -n alphatrion clickhouse-0 -- clickhouse-client --query="RESTORE DA
# 1. Deploy HA cluster alongside existing single node (use different namespace temporarily)
kubectl create namespace alphatrion-ha
# Edit clickhouse-ha.yaml to use alphatrion-ha namespace
kubectl apply -f ./helm-charts/clickhouse/clickhouse-ha.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-ha.yaml

# 2. Use clickhouse-copier or remote() function to copy data
kubectl exec -n alphatrion-ha clickhouse-0 -- clickhouse-client --query="
Expand All @@ -296,7 +296,7 @@ SELECT * FROM remote('clickhouse-0.clickhouse.alphatrion.svc.cluster.local:9000'
# Update service discovery or change host in values.yaml

# 4. Delete old single-node deployment
kubectl delete -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl delete -f ./charts/clickhouse/clickhouse-statefulset.yaml
```

## Troubleshooting
Expand Down
14 changes: 7 additions & 7 deletions helm-charts/clickhouse/README.md → charts/clickhouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For HA setup, see **[High Availability Setup Guide](HA-SETUP.md)**.
### 1. Create gp3 Storage Class

```bash
kubectl apply -f ./helm-charts/clickhouse/storageclass-gp3.yaml
kubectl apply -f ./charts/clickhouse/storageclass-gp3.yaml
```

### 2. Create Namespace (if not exists)
Expand All @@ -44,7 +44,7 @@ kubectl create namespace alphatrion
### 3. Deploy ClickHouse

```bash
kubectl apply -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-statefulset.yaml
```

### 4. Verify Deployment
Expand Down Expand Up @@ -160,8 +160,8 @@ server:
Or use the provided values file:

```bash
helm upgrade alphatrion ./helm-charts/alphatrion \
-f ./helm-charts/alphatrion/values-with-clickhouse.yaml
helm upgrade alphatrion ./charts/alphatrion \
-f ./charts/alphatrion/values-with-clickhouse.yaml
```

## Accessing ClickHouse
Expand Down Expand Up @@ -219,14 +219,14 @@ containers:
Then apply the changes:

```bash
kubectl apply -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl apply -f ./charts/clickhouse/clickhouse-statefulset.yaml
```

## Uninstallation

```bash
# Delete the StatefulSet and Service
kubectl delete -f ./helm-charts/clickhouse/clickhouse-statefulset.yaml
kubectl delete -f ./charts/clickhouse/clickhouse-statefulset.yaml

# Delete PVC if needed (⚠️ This deletes all data!)
kubectl delete pvc -n alphatrion clickhouse-data-clickhouse-0
Expand Down Expand Up @@ -284,7 +284,7 @@ kubectl describe storageclass gp3
If gp3 storage class doesn't exist, create it:

```bash
kubectl apply -f ./helm-charts/clickhouse/storageclass-gp3.yaml
kubectl apply -f ./charts/clickhouse/storageclass-gp3.yaml
```

### Connection issues
Expand Down
Loading