Skip to content

feat: Helm chart for Kubernetes deployment#2

Open
nickmarden wants to merge 6 commits intofeat/openclaw-api-backendfrom
feat/helm-chart
Open

feat: Helm chart for Kubernetes deployment#2
nickmarden wants to merge 6 commits intofeat/openclaw-api-backendfrom
feat/helm-chart

Conversation

@nickmarden
Copy link

@nickmarden nickmarden commented Mar 12, 2026

What does this PR do?

Adds a Helm chart for deploying Pinchy + OpenClaw + optional PostgreSQL to Kubernetes, plus CI workflows to build and publish container images to GHCR.

Depends on #1

Type of change

  • ✨ New feature
  • 🔧 Tooling / CI

Changes

  • Helm chart (deploy/helm/pinchy/): Deploys Pinchy (Deployment), OpenClaw (StatefulSet), and optional PostgreSQL (StatefulSet) behind a single Ingress with WebSocket annotations
  • Secrets management: Gateway token, Better Auth secret, encryption key, and PG password auto-generate on first install and preserve on upgrade via lookup (Creel pattern)
  • Gateway token sharing: K8s Secret mounted into both pods; OpenClaw initContainer seeds openclaw.json with the token, Pinchy reads it from a file mount
  • Plugin sync: OpenClaw initContainer copies plugins from the Pinchy image via emptyDir, keeping plugins in lockstep with the Pinchy version
  • docker-publish.yml: Builds both container images on version tags (semver) and branch pushes (mutable + SHA-pinned tags)
  • docker-cleanup.yml: Daily scheduled cleanup of branch-tagged images older than 15 days
  • entrypoint.sh: Makes chown /openclaw-config conditional so it works in API mode where the shared volume doesn't exist

Checklist

  • I've read the Contributing Guide
  • My code follows the project's style
  • I've added tests for new functionality (if applicable)
  • I've updated the documentation (if applicable)
  • All existing tests pass

@nickmarden nickmarden force-pushed the feat/openclaw-api-backend branch from 53036c8 to e9a9881 Compare March 13, 2026 14:06
Helm chart deploying Pinchy + OpenClaw + optional PostgreSQL to K8s.
Secrets auto-generate on first install and preserve on upgrade.
Gateway token shared via K8s Secret; plugins synced via initContainer.
Includes CI workflows to build/push container images on tags and PRs,
with automatic cleanup of PR images after 15 days.
pull_request events use the workflow from the base branch, so the
workflow must exist on main before it can fire. Switch to push-to-branch
triggers which use the workflow from the pushed branch itself.

Branch builds get tags like feat-helm-chart and feat-helm-chart-abc1234.
Cleanup regex updated to match conventional branch prefixes.
Use type=ref for both tags so slashes in branch names like
feat/helm-chart are normalized to feat-helm-chart. Also gitignore
lab-values.yaml files in Helm charts.
Plugins were mounted at /openclaw-extensions but OpenClaw looks for
them at /root/.openclaw/extensions/. This caused config.set to fail
with "invalid config" because plugin IDs referenced in the config
didn't exist. Also bump Pinchy probe delays for Next.js cold start.
OpenClaw takes ~30s to restart after config.set, plus additional time
for WebSocket reconnection and device re-pairing. The 30s default was
too tight, especially in Kubernetes where startup is slower.

The timeout is now configurable via OPENCLAW_RECONNECT_TIMEOUT_MS.
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.

1 participant