Commit e2c4fce
fix: lowercase CleanStringForDNS output for RFC 1123 compliance (#228)
## Summary
`CleanStringForDNS` strips invalid characters but does not lowercase the
result. When an image tag contains uppercase characters (e.g.
`myimage:master--HEAD`), `ComputeVersionedDeploymentName` produces a
deployment name that violates RFC 1123 DNS label rules, causing
Kubernetes to reject the Deployment.
This adds `strings.ToLower()` to `CleanStringForDNS` so deployment names
are always valid DNS labels.
### Why `CleanStringForDNS` and not `cleanBuildID`?
The build ID is also used as a Kubernetes label value and as the
Temporal worker build ID. Labels allow uppercase (`[a-zA-Z0-9._-]`), and
Temporal build IDs just need to be ASCII. Lowercasing only in
`CleanStringForDNS` keeps the fix scoped to where DNS compliance is
required (resource names) without affecting label values or Temporal
version matching.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent f394c51 commit e2c4fce
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
482 | 488 | | |
483 | 489 | | |
484 | 490 | | |
| |||
0 commit comments