{"id":29584333,"url":"https://github.com/temporalio/temporal-worker-controller","last_synced_at":"2026-04-30T01:05:36.096Z","repository":{"id":177659959,"uuid":"633112512","full_name":"temporalio/temporal-worker-controller","owner":"temporalio","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-21T02:20:37.000Z","size":31525,"stargazers_count":124,"open_issues_count":33,"forks_count":18,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-21T03:52:21.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temporalio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-26T20:05:59.000Z","updated_at":"2026-01-21T02:20:41.000Z","dependencies_parsed_at":"2023-12-14T23:31:53.455Z","dependency_job_id":"1d516450-2d3a-4665-b0b4-660727866ba7","html_url":"https://github.com/temporalio/temporal-worker-controller","commit_stats":null,"previous_names":["jlegrone/worker-controller","jlegrone/temporal-worker-controller","temporalio/temporal-worker-controller","datadog/temporal-worker-controller"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/temporalio/temporal-worker-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-worker-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-worker-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-worker-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-worker-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temporalio","download_url":"https://codeload.github.com/temporalio/temporal-worker-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temporalio%2Ftemporal-worker-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28625926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-20T00:31:24.804Z","updated_at":"2026-04-30T01:05:36.088Z","avatar_url":"https://github.com/temporalio.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Temporal Worker Controller\n\n[![License](https://img.shields.io/github/license/temporalio/temporal-worker-controller)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/temporalio/temporal-worker-controller)](https://goreportcard.com/report/github.com/temporalio/temporal-worker-controller)\n\n\u003e 🚀 **Public Preview**: This project is in [Public Preview](https://docs.temporal.io/evaluate/development-production-features/release-stages) and ready for production use cases*. Core functionality is complete with stable APIs.\n\n**The Temporal Worker Controller makes it simple and safe to deploy Temporal workers on Kubernetes.**\n\nTemporal workflows require deterministic execution, which means updating worker code can break running workflows if the changes aren't backward compatible. Traditional deployment strategies force you to either risk breaking existing workflows or use Temporal's [Patching API](https://docs.temporal.io/patching) to maintain compatibility across versions.\n\nTemporal's [Worker Versioning](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning) feature solves this dilemma by providing programmatic control over worker versions and traffic routing. The Temporal Worker Controller automates a deployment system that uses Worker Versioning on Kubernetes. When you deploy new code, the controller automatically creates a new worker version while keeping the old version running. Existing workflows continue on the old version while new workflows use the new version. This approach eliminates the need for patches in many cases and ensures running workflows are never disrupted.\n\n## What does it do?\n\n🔒 **Protected [Pinned](https://docs.temporal.io/worker-versioning#pinned) workflows** - Workflows pinned to a version stay on that version and won't break  \n🎚️ **Controlled rollout for [AutoUpgrade](https://docs.temporal.io/worker-versioning#auto-upgrade) workflows** - AutoUpgrade workflows shifted to new versions with configurable safety controls  \n📦 **Automatic version management** - Registers versions with Temporal, manages routing rules, and tracks version lifecycle  \n🎯 **Smart traffic routing** - New workflows automatically get routed to your target worker version  \n🛡️ **Progressive rollouts** - Catch incompatible changes early with small traffic percentages before they spread  \n⚡ **Easy rollbacks** - Instantly route traffic back to a previous version if issues are detected  \n📈 **Per-version autoscaling** - Attach HPAs or other custom scalers to each versioned Deployment via [`WorkerResourceTemplate`](docs/worker-resource-templates.md)\n\n## Quick Example\n\nInstead of this traditional approach where deployments can break running workflows:\n\n```yaml\n# ❌ Traditional deployment - risky for running workflows\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: my-worker\nspec:\n  template:\n    spec:\n      containers:\n      - name: worker\n        image: my-worker:v2.0.0  # This change might break existing workflows!\n```\n\nYou define your worker like this:\n\n```yaml\n# ✅ Temporal Worker Controller - safe deployments\napiVersion: temporal.io/v1alpha1\nkind: TemporalWorkerDeployment\nmetadata:\n  name: my-worker\nspec:\n  replicas: 3\n  rollout:\n    strategy: Progressive  # Gradual, safe rollout\n    steps:\n      - rampPercentage: 10\n        pauseDuration: 5m\n      - rampPercentage: 50\n        pauseDuration: 10m\n  template:\n    spec:\n      containers:\n      - name: worker\n        image: my-worker:v2.0.0  # Safe to deploy!\n```\n\nWhen you update the image, the controller automatically:\n1. 🆕 Creates a new deployment with your updated worker\n2. 📊 Gradually routes new workflows and AutoUpgrade workflows to the new version  \n3. 🔒 Keeps Pinned workflows running on their original version (guaranteed safety)\n4. 🧹 Automatically scales down and cleans up old versions once they are [drained](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning#sunsetting-an-old-deployment-version)\n\n## 🏃‍♂️ Getting Started\n\n### Prerequisites\n\n- Kubernetes cluster (1.19+)\n- Helm [v3.0+](https://github.com/helm/helm/releases) if deploying via our Helm chart\n- [Temporal Server](https://docs.temporal.io/) (Cloud or self-hosted [v1.29.1](https://github.com/temporalio/temporal/releases/tag/v1.29.1))\n- Basic familiarity with Temporal [Workers](https://docs.temporal.io/workers), [Workflows](https://docs.temporal.io/workflows), and [Worker Versioning](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning)\n- **TLS for the validating webhook** *(required for `WorkerResourceTemplate`)* — the recommended path is [cert-manager](https://cert-manager.io/docs/installation/), which handles certificate provisioning automatically. Install it separately or as a subchart of the controller chart (`certmanager.install: true`). If you prefer to manage TLS yourself, see [Webhook TLS](docs/worker-resource-templates.md#webhook-tls).\n\n### 🔧 Installation\n\nCRDs are shipped as a separate Helm chart so they can be upgraded independently of the controller. Install the CRDs chart first, then the controller chart:\n\n```bash\n# 1. Install CRDs\nhelm install temporal-worker-controller-crds \\\n  oci://docker.io/temporalio/temporal-worker-controller-crds \\\n  --version \u003cversion\u003e \\\n  --namespace \u003cyour-namespace\u003e \\\n  --create-namespace\n\n# 2. Install the controller\nhelm install temporal-worker-controller \\\n  oci://docker.io/temporalio/temporal-worker-controller \\\n  --version \u003cversion\u003e \\\n  --namespace \u003cyour-namespace\u003e\n```\n\nSee [docs/crd-management.md](docs/crd-management.md) for upgrade, rollback, and migration instructions.\n\n### Next Steps\n\n**New to deploying workers with this controller?** → Start with our [Migration Guide](docs/migration-to-versioned.md) to learn how to safely transition from traditional deployments.\n\n**Setting up CI/CD for steady-state rollouts?** → See the [CD Rollouts Guide](docs/cd-rollouts.md) for Helm, kubectl, ArgoCD, and Flux integration patterns.\n\n**Ready to dive deeper?** → Check out the [Architecture Guide](docs/architecture.md) to understand how the controller works, or the [Temporal Worker Versioning docs](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning) to learn about the underlying Temporal feature.\n\n**Need configuration help?** → See the [Configuration Reference](docs/configuration.md) for all available options.\n\n## Features\n\n- ✅ **Registration of new Temporal Worker Deployment Versions**\n- ✅ **Creation of versioned Deployment resources** (managing Pods that run your Temporal workers)\n- ✅ **Automatic lifecycle scaling** - Scales down worker versions when no longer needed\n- ✅ **Deletion of resources** associated with drained Worker Deployment Versions\n- ✅ **Multiple rollout strategies**: `Manual`, `AllAtOnce`, and `Progressive` rollouts\n- ✅ **Gate workflows** - Test new versions with a [pre-deployment test](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning#adding-a-pre-deployment-test) before routing real traffic to them\n- ✅ **Per-version attached resources** - Attach HPAs, PodDisruptionBudgets, or any namespaced Kubernetes resource to each worker version with running workers via [`WorkerResourceTemplate`](docs/worker-resource-templates.md) — this is also the recommended path for metric-based and backlog-based autoscaling\n\n\n## 💡 Why Use This?\n\n### Manual Worker Versioning is Complex\n\nWhile Temporal's [Worker Versioning](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning) feature solves deployment safety problems, using it manually requires:\n\n- **Manual API calls** - Register versions, manage routing rules, track version states\n- **Infrastructure coordination** - Deploy multiple Kubernetes resources for each version  \n- **Lifecycle monitoring** - Watch for drained versions and clean up resources\n- **Rollout orchestration** - Manually control progressive traffic shifting\n\n### The Controller Automates Everything\n\nThe Temporal Worker Controller eliminates this operational overhead by automating the entire Worker Versioning lifecycle on Kubernetes:\n\n- **Automatic Temporal integration** - Registers versions and manages routing without manual API calls\n- **Kubernetes-native workflow** - Update a single custom resource, get full [rainbow deployments](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning#deployment-systems)  \n- **Intelligent cleanup** - Monitors version [drainage](https://docs.temporal.io/production-deployment/worker-deployments/worker-versioning#sunsetting-an-old-deployment-version) and automatically removes unused resources\n- **Built-in rollout strategies** - Progressive, AllAtOnce, and Manual with configurable safety controls\n\n## 📖 Documentation\n\n| Document                                                    | Description                                                           |\n|-------------------------------------------------------------|-----------------------------------------------------------------------|\n| [Releases](docs/release.md)                                 | How we version and release the controller and Helm Chart              |\n| [Migration Guide](docs/migration-to-versioned.md)           | Step-by-step guide for migrating from traditional deployments         |\n| [Reversion Guide](docs/migration-to-unversioned.md)         | Step-by-step guide for migrating back to unversioned deployment       |\n| [CD Rollouts](docs/cd-rollouts.md)                          | Helm, kubectl, ArgoCD, and Flux integration for steady-state rollouts |\n| [Architecture](docs/architecture.md)                        | Technical deep-dive into how the controller works                     |\n| [Configuration](docs/configuration.md)                      | Complete configuration reference                                      |\n| [Concepts](docs/concepts.md)                                | Key concepts and terminology                                          |\n| [Limits](docs/limits.md)                                    | Technical constraints and limitations                                 |\n| [WorkerResourceTemplate](docs/worker-resource-templates.md) | Attach HPAs, PDBs, and other resources to each versioned Deployment   |\n| [CRD Management](docs/crd-management.md)                    | CRD upgrade, rollback, and migration guide                            |\n\n## 🔧 Worker Configuration\n\nYour workers need these environment variables (automatically set by the controller):\n\n```bash\nTEMPORAL_ADDRESS=your-temporal-server:7233\nTEMPORAL_NAMESPACE=your-namespace  \nTEMPORAL_DEPLOYMENT_NAME=my-worker        # Unique worker deployment name\nTEMPORAL_WORKER_BUILD_ID=v1.2.3          # Version identifier\n```\n\n**Important**: Don't set the above environment variables manually - the controller manages these automatically.\n\n## 🤝 Contributing\n\nWe welcome all contributions! This includes:\n\n- 🔧 **Code contributions** - Please start by [opening an issue](https://github.com/temporalio/temporal-worker-controller/issues/new) to discuss your idea\n- 🐛 **Bug reports** - [File an issue](https://github.com/temporalio/temporal-worker-controller/issues/new)\n- 💡 **Feature requests** - Tell us what you'd like to see\n- 💬 **Feedback** - Join [#safe-deploys](https://temporalio.slack.com/archives/C07MDJ6S3HP) on [Temporal Slack](https://t.mp/slack)\n\n## 🛠️ Development\n\nWant to try the controller locally? Check out the [local demo guide](internal/demo/README.md) for development setup.\n\nNeed a test controller image from an unmerged branch? Run the `publish-branch-image` GitHub Actions workflow with the branch name.\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n**Questions?** Reach out to [@jlegrone](https://github.com/jlegrone) or the [#safe-deploys](https://temporalio.slack.com/archives/C07MDJ6S3HP) channel on Temporal Slack!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Ftemporal-worker-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemporalio%2Ftemporal-worker-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemporalio%2Ftemporal-worker-controller/lists"}