When using TemporalWorkerDeployment with an image tag that contains uppercase characters, the controller creates a Kubernetes Deployment with an invalid name that violates RFC 1123 subdomain naming rules, causing the deployment to fail.
Environment:
temporal-worker-controller version: 0.73.1
Kubernetes version: 1.34
Temporal Cloud
Steps to Reproduce:
- Create a TemporalWorkerDeployment resource with an image tag containing uppercase characters:
apiVersion: temporal.io/v1alpha1
kind: TemporalWorkerDeployment
metadata:
name: name
namespace: my-namespace
spec:
replicas: 1
template:
spec:
containers:
- name: name
image: <image>:<CamelCaseTag> (example nginx:branch-NGX-123)
- Apply the resource to the cluster
- Observe the created Deployment name
Expected Behavior:
The controller should accept any tag name.
Root Cause Analysis:
The controller appears to derive the Deployment name from a combination of the TemporalWorkerDeployment name and the image tag (or a hash thereof). When the image tag contains uppercase characters (common in CI/CD pipelines using branch names like branch-PROJ-12345-feature-name), the resulting Deployment name violates Kubernetes naming conventions.
When using TemporalWorkerDeployment with an image tag that contains uppercase characters, the controller creates a Kubernetes Deployment with an invalid name that violates RFC 1123 subdomain naming rules, causing the deployment to fail.
Environment:
Steps to Reproduce:
Expected Behavior:
The controller should accept any tag name.
Root Cause Analysis:
The controller appears to derive the Deployment name from a combination of the
TemporalWorkerDeploymentname and the image tag (or a hash thereof). When the image tag contains uppercase characters (common in CI/CD pipelines using branch names like branch-PROJ-12345-feature-name), the resulting Deployment name violates Kubernetes naming conventions.