temporalio / temporalio/temporal-worker-controller
Support per-build ConfigMaps generated from WorkerResourceTemplate and consumable by versioned worker Deployments
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 187
- Forks
- 70
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 31
Description
Hello,
I would like to propose support for creating a ConfigMap per active worker version/build ID, with the same lifecycle as the versioned Kubernetes Deployment managed by a TemporalWorkerDeployment.
Problem
Today, WorkerResourceTemplate is a good fit for per-version auxiliary resources such as HPAs and PDBs, but it is difficult to use it for configuration that must be consumed by the worker pod itself.
A common use case is:
- render one ConfigMap per active worker version
- populate it with configuration associated with that deploy/version
- mount or reference that ConfigMap from the corresponding versioned worker Deployment
- delete it automatically when that version is sunset and its Deployment is deleted
The main gaps are:
- there is no first-class way to generate a per-version ConfigMap from a concrete values source
- there is no convenient way for the pod template in TemporalWorkerDeployment to reference the generated per-version ConfigMap
- lifecycle alignment is important: the generated ConfigMap should be created, updated, and deleted together with the worker version that uses it
Proposed behavior
I would like to contribute support for the following flow:
- A WorkerResourceTemplate can define a ConfigMap template.
- The controller renders one ConfigMap per active Build ID, just like it already does for other WRT-managed resources.
- The rendered ConfigMap can be populated from a specific values file/key stored in another ConfigMap (or similar explicit source).
- The versioned worker Deployment can reference the generated ConfigMap through a stable controller-resolved placeholder/mechanism.
- When the versioned worker Deployment is sunset, the rendered ConfigMap is deleted in the same cleanup flow.
Why this is useful
This would make it possible to keep version-specific runtime config close to the worker version lifecycle, without requiring users to manually create and clean up separate config objects for each rollout.
Example use cases:
- Helm/values-style config rendered per worker version
- feature flags or rollout parameters tied to a specific build
- generated config consumed as mounted files or env-from ConfigMap
Scope
My intention is to keep this narrowly scoped to per-version ConfigMap generation and consumption, reusing the existing WorkerResourceTemplate reconciliation and cleanup model as much as possible.
If this direction sounds reasonable, I can open a PR with a concrete proposal and implementation.
Thanks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing WorkerResourceTemplate reconciliation and cleanup flow for versioned worker Deployments. Define how a per-Build-ID ConfigMap is rendered, populated from an explicit source, and referenced by the corresponding Deployment. Done means creation, updates, pod consumption, and deletion remain aligned with the worker version lifecycle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100