temporalio / temporalio/temporal-worker-controller

[Feature Request] Support custom labels on generated Kubernetes Deployment resources

Open
#187 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
187
Forks
70
Avg merge
4d 1h
Merged PRs (30d)
31

Description

Is your feature request related to a problem? Please describe.

When deploying a TemporalWorkerDeployment resource, custom labels can only be applied to the pods via spec.template.metadata.labels. The generated Kubernetes Deployment resource itself only receives system-managed labels:

  • temporal.io/build-id
  • temporal.io/deployment-name
Describe the solution you'd like

Allow users to specify custom labels that should be applied to the generated Kubernetes Deployment resource (not just the pods).

This is useful for:

  • Adding deployment-level metadata (e.g., team: backend, environment: production)
  • Integration with external tools that query Deployment labels (e.g., cost allocation, monitoring dashboards)
  • Consistency with standard Kubernetes label conventions for deployments

Example

  apiVersion: temporal.io/v1alpha1
  kind: TemporalWorkerDeployment
  metadata:
    name: my-worker
  spec:
    deploymentLabels:  # New field
      team: backend
      environment: production
      cost-center: engineering
    template:
      metadata:
        labels:
          version: v1
      spec:
        containers:
          - name: worker
            image: myimage:latest

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TemporalWorkerDeployment specification and the controller code that generates Kubernetes Deployment resources. Trace how system-managed labels are assigned and check the existing controller tests, if present. Done means the requested deploymentLabels field is accepted and applied to the generated Deployment without changing pod labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.