Skip to content

Sync runtime api chart#304

Merged
chuckbutkus merged 28 commits into
mainfrom
sync-runtime-api-chart
Mar 3, 2026
Merged

Sync runtime api chart#304
chuckbutkus merged 28 commits into
mainfrom
sync-runtime-api-chart

Conversation

@chuckbutkus

Copy link
Copy Markdown
Contributor

Description

Helm Chart Checklist

  • I have updated the version field in Chart.yaml for each modified chart
  • I have tested the chart upgrade path from the previous version
  • I have verified backwards compatibility with existing values.yaml configurations
  • I have updated the chart's README.md if there are any breaking changes or new required values

Additional Notes

openhands-agent and others added 21 commits February 20, 2026 02:12
- 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>
…igrations

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.
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
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.
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.
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.
…ailures

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
@chuckbutkus chuckbutkus force-pushed the sync-runtime-api-chart branch from 37ad747 to 056db8d Compare March 3, 2026 19:55
@github-advanced-security

Copy link
Copy Markdown

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Comment thread charts/runtime-api/templates/clusterrole.yaml Outdated
chuckbutkus and others added 2 commits March 3, 2026 17:17
Co-authored-by: aivong-openhands <ai.vong@openhands.dev>
@chuckbutkus chuckbutkus merged commit 49dd2d2 into main Mar 3, 2026
14 checks passed
@chuckbutkus chuckbutkus deleted the sync-runtime-api-chart branch March 3, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants