Skip to content

Commit 7c65129

Browse files
authored
fix secret error (#211)
Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent f254036 commit 7c65129

22 files changed

Lines changed: 48 additions & 37 deletions
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ kubectl expose pod postgres --port=5432 --target-port=5432
6161

6262
```bash
6363
# Install with PostgreSQL connection
64-
helm install alphatrion ./helm-charts/alphatrion \
65-
-f ./helm-charts/alphatrion/values-dev.yaml \
64+
helm install alphatrion ./charts/alphatrion \
65+
-f ./charts/alphatrion/values-dev.yaml \
6666
--set postgresql.host=postgres \
6767
--set postgresql.password=alphatr1on
6868
```
@@ -101,10 +101,10 @@ If you want to enable tracing support with ClickHouse, you have two options:
101101

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

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

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

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

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

125125
# Or manually:
126-
kubectl apply -f ./helm-charts/clickhouse/clickhouse-ha.yaml
126+
kubectl apply -f ./charts/clickhouse/clickhouse-ha.yaml
127127
```
128128

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

131131
### Connect AlphaTrion to ClickHouse
132132

133133
```bash
134-
helm upgrade alphatrion ./helm-charts/alphatrion \
135-
-f ./helm-charts/alphatrion/values-with-clickhouse.yaml
134+
helm upgrade alphatrion ./charts/alphatrion \
135+
-f ./charts/alphatrion/values-with-clickhouse.yaml
136136
```
137137

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

177177
```bash
178-
helm upgrade alphatrion ./helm-charts/alphatrion -f ./helm-charts/alphatrion/values-dev.yaml
178+
helm upgrade alphatrion ./charts/alphatrion -f ./charts/alphatrion/values-dev.yaml
179179
```
180180

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

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

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

215215
# Install
216-
helm install alphatrion ./helm-charts/alphatrion -f my-prod-values.yaml
216+
helm install alphatrion ./charts/alphatrion -f my-prod-values.yaml
217217
```
218218

219219
## Troubleshooting
@@ -252,7 +252,7 @@ kubectl logs job/alphatrion-migration
252252

253253
# If you need to re-run migrations
254254
kubectl delete job alphatrion-migration
255-
helm upgrade alphatrion ./helm-charts/alphatrion
255+
helm upgrade alphatrion ./charts/alphatrion
256256
```
257257

258258
## Using AlphaTrion in Your Application
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This Helm chart deploys AlphaTrion, an open-source framework for GenAI applicati
1313
Install the chart with your PostgreSQL configuration:
1414

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

137137
```bash
138-
helm install alphatrion ./helm-charts/alphatrion \
138+
helm install alphatrion ./charts/alphatrion \
139139
--set postgresql.host=my-postgres.example.com \
140140
--set postgresql.password=mypassword
141141
```
@@ -152,7 +152,7 @@ kubectl create secret generic alphatrion-postgres-credentials \
152152
Then install with the secret reference:
153153

154154
```bash
155-
helm install alphatrion ./helm-charts/alphatrion \
155+
helm install alphatrion ./charts/alphatrion \
156156
--set postgresql.host=my-postgres.example.com \
157157
--set postgresql.existingSecret=alphatrion-postgres-credentials
158158
```
@@ -162,7 +162,7 @@ helm install alphatrion ./helm-charts/alphatrion \
162162
To expose AlphaTrion via Ingress:
163163

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

202202
```bash
203-
helm upgrade alphatrion ./helm-charts/alphatrion \
203+
helm upgrade alphatrion ./charts/alphatrion \
204204
-f custom-values.yaml
205205
```
206206

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

259259
```bash
260-
helm show values ./helm-charts/alphatrion
260+
helm show values ./charts/alphatrion
261261
```
262262

263263
## License
File renamed without changes.

helm-charts/alphatrion/templates/_helpers.tpl renamed to charts/alphatrion/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ PostgreSQL password secret name
148148
PostgreSQL password secret key
149149
*/}}
150150
{{- define "alphatrion.postgresql.secretKey" -}}
151-
{{- "postgres-password" }}
151+
{{- .Values.postgresql.existingSecretKey | default "postgres-password" }}
152152
{{- end }}
153153

154154
{{/*
@@ -169,6 +169,13 @@ ClickHouse secret name
169169
{{- end }}
170170
{{- end }}
171171

172+
{{/*
173+
ClickHouse password secret key
174+
*/}}
175+
{{- define "alphatrion.clickhouse.secretKey" -}}
176+
{{- .Values.clickhouse.existingSecretKey | default "clickhouse-password" }}
177+
{{- end }}
178+
172179
{{/*
173180
Docker Registry secret name
174181
*/}}

helm-charts/alphatrion/templates/clickhouse-migration-job.yaml renamed to charts/alphatrion/templates/clickhouse-migration-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ spec:
139139
valueFrom:
140140
secretKeyRef:
141141
name: {{ include "alphatrion.clickhouse.secretName" . }}
142-
key: clickhouse-password
142+
key: {{ include "alphatrion.clickhouse.secretKey" . }}
143143
{{- end }}
144144
{{- end }}

helm-charts/alphatrion/templates/dashboard-deployment.yaml renamed to charts/alphatrion/templates/dashboard-deployment.yaml

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)