Commit 49dd2d2
Sync runtime api chart (#304)
* Sync runtime-api helm chart with source repository
- Update Chart.yaml, Chart.lock, and values.yaml
- Update all template files to match source
- Add monitoring.yaml for monitoring configuration
- Add test-keys-cleanup-cronjob.yaml for test key cleanup
- Remove obsolete ingress-base-configmap.yaml
Co-authored-by: openhands <openhands@all-hands.dev>
* Some merge fixes
* More merge fixes
* More merge fixes
* More merge fixes
* Merge fixes
* Remove unnecessary values
* Monitoring off by default
* Update serviceaccount.yaml
* Add wait-for-postgres hook job to ensure PostgreSQL is ready before migrations
This adds a new Helm hook job that waits for PostgreSQL to be ready before
the migrate-db job runs. The wait-for-postgres job has hook weight -10,
which ensures it runs before migrate-db (weight -5).
This guarantees PostgreSQL is accepting connections before database
migrations are attempted.
* Add wait-for-postgres hook job to runtime-api chart
This adds a wait-for-postgres hook job to the runtime-api chart with hook
weight -10, ensuring PostgreSQL is ready before the migrate-db job (weight -5)
runs.
The job only runs when:
- postgresql.enabled or postgresql.postMigrate is true
- externalDatabase.enabled is false
* Fix postgres startup ordering for runtime-api migrate-db job
Changes:
1. Add wait-for-postgres init container to runtime-api migrate-db job
when postgresql.postMigrate is true (not just for externalDatabase)
2. Change openhands Chart.yaml to use local runtime-api chart
(file://../runtime-api) instead of OCI registry
3. Remove separate wait-for-postgres hook job (using init container instead)
This ensures the migrate-db job waits for PostgreSQL to be ready before
attempting to run migrations, preventing the helm install from blocking.
* Add postMigrate default value to runtime-api values.yaml
The postMigrate value was not defined in the default values, which caused
Helm to not properly merge the parent chart's override. This resulted in
the migrate-db job running as a pre-install hook instead of post-install,
creating a deadlock where the job waits for PostgreSQL but PostgreSQL
can't be deployed until the hook completes.
Adding postMigrate: false as a default allows Helm to properly merge
the parent chart's runtime-api.postgresql.postMigrate: true setting.
* Fix nil pointer errors when accessing hyphenated value keys
Add nil checks before accessing nested keys in hyphenated value names
(runtime-api, litellm-helm) to prevent 'index of nil pointer' errors
when these values aren't defined in the merged values.
* fix: Use separate ServiceAccount for migrate-db hook to prevent pod failures
The ServiceAccount was configured with Helm hooks (pre-install,pre-upgrade)
to ensure it exists before the migrate-db job runs. However, this caused the
ServiceAccount to be recreated during helm upgrade, invalidating tokens for
running pods and causing runtime-api pod failures until restart.
Solution:
- Keep the main ServiceAccount (runtime-api-sa) as a regular resource for
the deployment and cronjobs - this persists across upgrades
- Create a separate hook ServiceAccount (runtime-api-sa-hook) with the Helm
hooks for the migrate-db job - this can safely be recreated
This ensures:
1. The migrate-db job still has a ServiceAccount available during hooks
2. Running pods keep their valid tokens across upgrades
* Fixes
* Update chart versions
* Update chart versions
* Fix runtime-api repo
* Fix runtime-api name and bump version
* Bump
* Update runtime-api tag
* Fix tag
* Fix value file
* Update lock file
* Update charts/runtime-api/templates/clusterrole.yaml
Co-authored-by: aivong-openhands <ai.vong@openhands.dev>
* Update runtime-api chart version
---------
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: aivong-openhands <ai.vong@openhands.dev>1 parent 2b62fc0 commit 49dd2d2
19 files changed
Lines changed: 237 additions & 43 deletions
File tree
- charts
- openhands
- templates
- runtime-api
- templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| |||
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
190 | | - | |
| 194 | + | |
191 | 195 | | |
192 | 196 | | |
193 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
0 commit comments