Skip to content

Commit bdfe27f

Browse files
committed
refactor(helm): update deployment instructions and values for amazee.ai
- Modify Helm deployment commands to automatically create the namespace, simplifying the installation process. - Update the values.yaml to include additional volume mounts for pgvector support in PostgreSQL. - Enhance documentation with troubleshooting steps for namespace conflicts during installation.
1 parent b84bbc4 commit bdfe27f

File tree

2 files changed

+46
-12
lines changed

2 files changed

+46
-12
lines changed

helm/HELM_DEPLOYMENT.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ helm repo update
3434
### 2. Deploy the Complete Stack
3535

3636
```bash
37-
# Create a namespace
38-
kubectl create namespace amazee-ai
39-
40-
# Deploy the complete application
41-
helm install amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
37+
# Deploy the complete application (Helm will create the namespace automatically)
38+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
4239
--namespace amazee-ai \
40+
--create-namespace \
4341
--version 0.0.1
4442
```
4543

@@ -49,20 +47,23 @@ helm install amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
4947
```bash
5048
helm install frontend oci://ghcr.io/amazeeio/amazee.ai/frontend \
5149
--namespace amazee-ai \
50+
--create-namespace \
5251
--version 0.0.1
5352
```
5453

5554
#### Backend Only
5655
```bash
5756
helm install backend oci://ghcr.io/amazeeio/amazee.ai/backend \
5857
--namespace amazee-ai \
58+
--create-namespace \
5959
--version 0.0.1
6060
```
6161

6262
#### PostgreSQL Only (using Bitnami)
6363
```bash
6464
helm install postgresql bitnami/postgresql \
6565
--namespace amazee-ai \
66+
--create-namespace \
6667
--set auth.postgresPassword="your-password" \
6768
--set auth.database="postgres_service"
6869
```
@@ -106,17 +107,19 @@ backend:
106107
Deploy with custom values:
107108
108109
```bash
109-
helm install amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
110+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
110111
--namespace amazee-ai \
112+
--create-namespace \
111113
--version 0.0.1 \
112114
--values values.yaml
113115
```
114116

115117
### Using Command Line Overrides
116118

117119
```bash
118-
helm install amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
120+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
119121
--namespace amazee-ai \
122+
--create-namespace \
120123
--version 0.0.1 \
121124
--set frontend.enabled=true \
122125
--set backend.enabled=true \
@@ -151,7 +154,7 @@ To upgrade to a newer version:
151154
helm search repo oci://ghcr.io/amazeeio/amazee.ai/amazee-ai --versions
152155

153156
# Upgrade to a specific version
154-
helm upgrade amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
157+
helm upgrade amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
155158
--namespace amazee-ai \
156159
--version 0.0.2
157160
```
@@ -160,7 +163,7 @@ helm upgrade amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
160163

161164
```bash
162165
# Uninstall the complete stack
163-
helm uninstall amazee-ai -n amazee-ai
166+
helm uninstall amazee-ai-app -n amazee-ai
164167

165168
# Or uninstall individual components
166169
helm uninstall frontend -n amazee-ai
@@ -173,7 +176,7 @@ helm uninstall postgresql -n amazee-ai
173176
### Check Chart Status
174177
```bash
175178
helm list -n amazee-ai
176-
helm status amazee-ai -n amazee-ai
179+
helm status amazee-ai-app -n amazee-ai
177180
```
178181

179182
### View Logs
@@ -191,12 +194,37 @@ kubectl logs -n amazee-ai deployment/postgresql
191194
### Debug Installation
192195
```bash
193196
# Dry run to see what would be installed
194-
helm install amazee-ai oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
197+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
195198
--namespace amazee-ai \
199+
--create-namespace \
196200
--version 0.0.1 \
197201
--dry-run --debug
198202
```
199203

204+
### Namespace Conflicts
205+
206+
If you encounter namespace ownership errors like:
207+
```
208+
Error: INSTALLATION FAILED: Unable to continue with install: Namespace "amazee-ai" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata
209+
```
210+
211+
This happens when the namespace was created manually with `kubectl create namespace` instead of by Helm. To fix this:
212+
213+
```bash
214+
# Option 1: Delete the existing namespace and let Helm recreate it
215+
kubectl delete namespace amazee-ai
216+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
217+
--namespace amazee-ai \
218+
--create-namespace \
219+
--version 0.0.1
220+
221+
# Option 2: Use a different namespace name
222+
helm install amazee-ai-app oci://ghcr.io/amazeeio/amazee.ai/amazee-ai \
223+
--namespace amazee-ai-new \
224+
--create-namespace \
225+
--version 0.0.1
226+
```
227+
200228
## Security Considerations
201229

202230
1. **Secrets Management**: Use Kubernetes secrets or external secret managers for sensitive data

helm/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ postgresql:
2727
extraVolumes:
2828
- name: pgvector-extension
2929
emptyDir: {}
30+
- name: pgvector-lib
31+
emptyDir: {}
3032
extraVolumeMounts:
3133
- name: pgvector-extension
3234
mountPath: /docker-entrypoint-initdb.d
35+
- name: pgvector-lib
36+
mountPath: /usr/lib/postgresql/16/lib
3337
initContainers:
3438
- name: install-pgvector
3539
image: pgvector/pgvector:pg16
36-
command: ['sh', '-c', 'cp /usr/share/postgresql/16/extension/pgvector* /docker-entrypoint-initdb.d/']
40+
command: ['sh', '-c', 'cp /usr/share/postgresql/16/extension/vector* /docker-entrypoint-initdb.d/ && cp /usr/lib/postgresql/16/lib/vector.so /usr/lib/postgresql/16/lib/']
3741
volumeMounts:
3842
- name: pgvector-extension
3943
mountPath: /docker-entrypoint-initdb.d
44+
- name: pgvector-lib
45+
mountPath: /usr/lib/postgresql/16/lib
4046

4147
# Backend subchart configuration
4248
backend:

0 commit comments

Comments
 (0)