Add automation service subchart#464
Conversation
- Add automation helm chart with deployment, service, ingress, and service account templates - Support for PostgreSQL database (ephemeral or GCP Cloud SQL) - Datadog integration for monitoring - Update publish-helm-charts workflow to include automation chart - Update preview-helm-charts workflow to include automation chart - Update validate-chart-versions workflow to include automation-publishable output Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Add AUTOMATION_SERVICE_KEY environment variable configuration to both charts: - automation chart: Add serviceKeyFromSecret config for authenticating requests from OpenHands SaaS to the automation service - openhands chart: Add automationServiceKey config for providing the service key to the OpenHands app Both are disabled by default and can be enabled via values overrides. Co-authored-by: openhands <openhands@all-hands.dev>
The SaaS app expects AUTOMATIONS_SERVICE_KEY (plural) while the automation service expects AUTOMATION_SERVICE_KEY (singular). Co-authored-by: openhands <openhands@all-hands.dev>
Uncomment the serviceKeyFromSecret configuration so AUTOMATION_SERVICE_KEY env var is set by default when the secret exists. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Bump version to trigger preview chart publish for PR testing. Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
- Add gcs.enabled and gcs.bucket configuration in values.yaml - Add GCS_BUCKET_NAME env var when gcs.enabled is true Co-authored-by: openhands <openhands@all-hands.dev>
d006149 to
c65e542
Compare
- Add gcsEmulator configuration in values.yaml with fake-gcs-server settings - Add STORAGE_EMULATOR_HOST and GCS_BUCKET_NAME env vars when emulator is enabled - Add fake-gcs-server as sidecar container in deployment when enabled - Uses in-memory backend for completely ephemeral storage Co-authored-by: openhands <openhands@all-hands.dev>
Add openhandsApi config to dynamically construct the API base URL:
- baseUrl: explicit URL (for staging/production)
- host + prefixWithBranch: auto-construct https://{branch}.{host} (for feature envs)
This eliminates the need to hardcode branch-specific URLs in feature environment values.
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
0591644 to
1995b74
Compare
…backs
The automation service needs its own public URL to construct callback URLs
that sandboxes use to report completion status. Without this, the service
falls back to http://localhost:8000 which is unreachable from sandboxes.
The URL is auto-constructed from ingress settings:
- With prefixWithBranch: https://automation-{branch}.{host}
- Without prefix: https://{host}
Co-authored-by: openhands <openhands@all-hands.dev>
|
👋 Hi! This is OpenHands assisting @jpshackelford with reviewing this PR. After analyzing the PR and discussing requirements, we'd like to share some considerations for the automation chart integration: Helm-Based Install RequirementsFor the standard helm-based install, we'd like the automation chart to follow the subchart pattern used by Changes Needed to
|
| Install Method | Requirement |
|---|---|
| Helm | Subchart of openhands chart with automation.enabled flag |
| Replicated | Config via UI, prefer app server routing over new subdomain |
Happy to discuss further or help with implementation!
- Add automation as dependency in openhands Chart.yaml - Add automation configuration block to openhands values.yaml - Create ingress-automation.yaml for /automation subpath routing - Create middleware-automation.yaml for Traefik path stripping - Fix automation image repository to ghcr.io/openhands/automation Co-authored-by: openhands <openhands@all-hands.dev>
- Bump openhands chart version to 0.2.18 - Fix automation dependency to use specific version 0.1.0 (OCI doesn't support wildcards) Co-authored-by: openhands <openhands@all-hands.dev>
fe32ea8 to
f41816c
Compare
- Remove charts/automation/templates/ingress.yaml entirely - Simplify _env.yaml to require parent chart to provide URLs - Add automationBaseUrl value for callback URL configuration - Simplify openhandsApi to just baseUrl (no dynamic construction) - Update openhands chart values to document subpath routing Co-authored-by: openhands <openhands@all-hands.dev>
- Add host and prefixWithBranch values to automation chart
- Update _env.yaml to construct URLs with /automation subpath
- URLs are now: https://{host}/automation or https://{branch}.{host}/automation
- Remove automationBaseUrl and openhandsApi.baseUrl in favor of host config
Co-authored-by: openhands <openhands@all-hands.dev>
- Reorder matrix so automation and runtime-api are published before openhands - Add step to update automation dependency version in openhands Chart.yaml - This ensures the automation preview chart is available when openhands tries to download it Co-authored-by: openhands <openhands@all-hands.dev>
The automation subchart creates a service named 'automation' (hardcoded),
not '{{ .Release.Name }}-automation'. Update the ingress to use the correct
service name.
Co-authored-by: openhands <openhands@all-hands.dev>
- Add database.useSharedPostgres option to use parent's PostgreSQL instance
- When enabled, constructs DB host from branchSanitized (openhands-{branch}-postgresql)
- Add initContainer to create automation database and user in shared PostgreSQL
- Keeps separate PostgreSQL subchart option for standalone deployments
- Staging/production continue to use Cloud SQL (useSharedPostgres=false)
This saves resources in feature environments by sharing PostgreSQL with Keycloak
while maintaining separate databases and users for isolation.
Co-authored-by: openhands <openhands@all-hands.dev>
Update ingress, middleware, and URL construction to serve automation under /api/automation instead of /automation. Co-authored-by: openhands <openhands@all-hands.dev>
For both feature and staging environments, the automation service should dispatch sandbox runs to the main staging environment (staging.all-hands.dev), not branch-specific deployments. - Feature env: https://staging.all-hands.dev (not https://{branch}.staging.all-hands.dev) - Staging env: https://staging.all-hands.dev - Production env: https://app.all-hands.dev The AUTOMATION_BASE_URL (callback URL) still respects prefixWithBranch since callbacks need to reach the specific automation instance. Co-authored-by: openhands <openhands@all-hands.dev>
xingyaoww
left a comment
There was a problem hiding this comment.
LGTM - but would love a second eye from someone who has more expertise on helm chart
|
I left some blocking comments but if the goal of this PR is just to move the chart from one place to another, I'm totally happy with just creating issues that we can follow up on later. |
|
@OpenHands please read all @jlav's review comment above, then open a new PR, following https://docs.openhands.dev/openhands/usage/use-cases/code-review and add Also in that PR, you should add the same workflow https://github.com/OpenHands/software-agent-sdk/blob/main/.github/workflows/pr-review-by-openhands.yml to this repo (expect env var to be already set). |
|
I'm on it! xingyaoww can track my progress at all-hands.dev |
- Add .agents/skills/code-review.md with repo-specific Helm chart review guidelines distilled from PR #464 review feedback - Add .github/workflows/pr-review-by-openhands.yml for automated PR reviews Co-authored-by: openhands <openhands@all-hands.dev>
Summary of Work CompletedI created PR #482 (Add code review skill and automated PR review workflow) on a new branch Checklist — Was the request fully addressed?
Are the changes concise?Yes — the PR contains exactly two new files with no extraneous changes:
No other files were modified, and no temporary or unnecessary files were created. |
- Add .agents/skills/code-review.md with repo-specific Helm chart review guidelines distilled from PR #464 review feedback - Add .github/workflows/pr-review-by-openhands.yml for automated PR reviews Co-authored-by: openhands <openhands@all-hands.dev>
Changes made based on review feedback: 1. Implement env var de-dupe pattern (blocking) - Added automation.env.defaults and automation.env templates - Follows the same pattern as openhands chart - Prevents duplicate env var warnings and merge conflicts 2. Simplify host configuration (blocking) - Removed host/prefixWithBranch toggles - Added explicit openhandsApiUrl and automationBaseUrl - Consumers pass full URLs directly 3. Simplify database configuration (blocking) - Removed useSharedPostgres toggle - Added createDatabaseUser as a clear, single-purpose toggle - Consumers pass full database.host directly 4. Align storage with openhands chart pattern (non-blocking) - Removed gcs/gcsEmulator configuration - Added filestore config matching openhands pattern - Uses minio for ephemeral environments (S3-compatible) - Supports gcs, s3, or minio backends Co-authored-by: openhands <openhands@all-hands.dev>
When automation is deployed as a subchart of openhands, it should use the parent chart's minio instance instead of deploying its own. Changes: - Add minio.enabled condition (default false) to control subchart deployment - Add minio.external config for pointing to external minio instance - Update _env.yaml to handle both deployed and external minio - Update openhands parent chart to configure automation with external minio Deployment modes: 1. Standalone: Set minio.enabled=true to deploy minio as a subchart 2. Subchart of openhands: Set minio.enabled=false and use minio.external Co-authored-by: openhands <openhands@all-hands.dev>
jlav
left a comment
There was a problem hiding this comment.
Thank you! Those updates look great 🎉
The automation chart was added in #464 but was missing its Replicated HelmChart manifest, causing the linter to fail with "Could not find helm chart manifest for archive automation-0.1.0.tgz".
The automation chart was added in #464 but was missing its Replicated HelmChart manifest, causing the linter to fail with "Could not find helm chart manifest for archive automation-0.1.0.tgz".
Summary
This PR adds the automation helm chart that was previously located in the deploy repo (
deploy/automation/chart). This follows the same pattern as the openhands chart, centralizing helm charts in the OpenHands-Cloud repository.Changes
New Automation Chart (
charts/automation/)_env.yaml: Environment variable helper templatedeployment.yaml: Kubernetes deployment with init containers for migrationsservice.yaml: ClusterIP service exposing port 80ingress.yaml: Optional ingress with TLS supportservice-account.yaml: Optional service account creationWorkflow Updates
automation-publishableoutputTesting
After this PR is merged, the deploy repo will be updated to:
oci://ghcr.io/all-hands-ai/helm-charts/automationCLOUD_CHART_SPECenvironment variable for both openhands and automation chartsRelated
Related to APP-1001
Related to ALL-5577
This is part of a larger effort to move helm charts from the deploy repo to the OpenHands-Cloud repo for better organization and version management.