Skip to content

v0.5.0

Choose a tag to compare

@YuminosukeSato YuminosukeSato released this 06 Feb 13:18
· 13 commits to main since this release
9a61f68

Summary

Kubernetes-ready distribution with Helm chart, Kustomize overlays, health probe endpoints, ExternalWorker for sidecar pattern, and production Dockerfiles.

What's New

Health Probe Handlers

  • LivenessHandler(pool) — always returns 200 for K8s liveness probe
  • ReadinessHandler(pool) — 200 when healthy workers exist and pool is not shutting down, 503 otherwise
  • StartupHandler(pool) — 200 when pool has completed startup, 503 otherwise
  • Pool.started flag tracks startup completion

ExternalWorker (Experimental)

  • ExternalWorker struct implements workerHandle for pre-existing worker processes (sidecar pattern)
  • NewExternalWorker(socketPath, connectTimeout) constructor
  • Start(): connection test via net.DialTimeout
  • IsHealthy(): connectivity probe
  • PoolOptions.ExternalMode + ExternalSocketPaths for sidecar deployment

Helm Chart (charts/pyproc/)

  • Full chart with deployment, service, serviceaccount, RBAC, HPA, PDB templates
  • Health probes configured via values (liveness /healthz, readiness /readyz, startup /startupz)
  • UDS emptyDir volume with Memory medium
  • Pod Security Standards: runAsNonRoot, drop ALL capabilities, readOnlyRootFilesystem
  • helm test support via test-connection template

Kustomize (deploy/kustomize/)

  • Base manifests converted from existing K8s documentation
  • Environment overlays: dev (1 replica), staging (2 replicas), production (3 replicas + PDB)

Dockerfiles

  • Dockerfile: Multi-stage build (Go 1.24-alpine builder → Python 3.12-slim runtime), non-root user
  • Dockerfile.worker: Python-only image for sidecar pattern, uv package manager

Documentation

  • K8s resource sizing recommendations by workload type (low-latency, batch, general)
  • Pod Security Standards compliance guide (Baseline/Restricted)
  • K8s troubleshooting guide (CrashLoopBackOff, probe failures, UDS permissions)
  • Helm usage examples (basic + sidecar)
  • Docker deployment guide rewritten (pip → uv)

CI

  • Helm lint and template validation
  • Kustomize build validation for all overlays

Files Changed

  • pkg/pyproc/health_handler.go, health_handler_test.go (new)
  • pkg/pyproc/worker_external.go, worker_external_test.go (new)
  • pkg/pyproc/pool.go (ExternalMode + started flag)
  • pkg/pyproc/pool_external_test.go (new)
  • charts/pyproc/ (new — complete Helm chart)
  • deploy/kustomize/ (new — base + overlays)
  • Dockerfile, Dockerfile.worker, .dockerignore (new)
  • docs/deployment/kubernetes-resources.md (new)
  • docs/deployment/kubernetes-troubleshooting.md (new)
  • docs/deployment/docker.md (rewritten)
  • examples/helm-basic/, examples/helm-sidecar/ (new)
  • .github/workflows/ci.yml (K8s manifest validation job)

Full Changelog: v0.4.5...v0.5.0

What's Changed

New Features

Documentation

Other Changes

Full Changelog: v0.4.3...v0.5.0