Skip to content

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

@evantissot

Description

@evantissot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions