fix: lowercase CleanStringForDNS output for RFC 1123 compliance#228
Draft
aarontsharp wants to merge 1 commit intotemporalio:mainfrom
Draft
fix: lowercase CleanStringForDNS output for RFC 1123 compliance#228aarontsharp wants to merge 1 commit intotemporalio:mainfrom
aarontsharp wants to merge 1 commit intotemporalio:mainfrom
Conversation
Kubernetes resource names must conform to RFC 1123 DNS labels, which require lowercase characters. CleanStringForDNS strips invalid characters but does not lowercase the result, causing deployment creation to fail when the image tag contains uppercase characters (e.g. "master--HEAD"). This adds strings.ToLower() to CleanStringForDNS so that ComputeVersionedDeploymentName always produces valid DNS labels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CleanStringForDNSstrips invalid characters but does not lowercase the result. When an image tag contains uppercase characters (e.g.myimage:master--HEAD),ComputeVersionedDeploymentNameproduces a deployment name that violates RFC 1123 DNS label rules, causing Kubernetes to reject the Deployment.This adds
strings.ToLower()toCleanStringForDNSso deployment names are always valid DNS labels.Why
CleanStringForDNSand notcleanBuildID?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 inCleanStringForDNSkeeps the fix scoped to where DNS compliance is required (resource names) without affecting label values or Temporal version matching.