Skip to content

Shorten deployment names when over 47 characters#204

Open
carlydf wants to merge 1 commit intomainfrom
keep-deployment-name-short
Open

Shorten deployment names when over 47 characters#204
carlydf wants to merge 1 commit intomainfrom
keep-deployment-name-short

Conversation

@carlydf
Copy link
Collaborator

@carlydf carlydf commented Feb 21, 2026

What was changed

Shorten deployment names (while keeping them unique) if over 47 characters.

Why?

Deployment names in k8s should be <=47 characters so that Pod names can be short enough for DNS limits.

Checklist

  1. Closes

  2. How was this tested:
    New unit tests, and existing functional tests. Ideally we should upgrade test this to ensure that controller can still find deployments that have names in the old format, and ensure that the controller doesn't try to recreate Deployments with different names. From reading the code I believe this should all work.

  3. Any docs updates needed?

@carlydf carlydf requested review from a team and jlegrone as code owners February 21, 2026 00:57

// ComputeVersionedDeploymentName generates a name for a versioned deployment
// Name will be <=47 characters and unique for that Worker Deployment Version within the namespace.
func ComputeVersionedDeploymentName(baseName, buildID string) string {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see kubebuilder library for shortening k8s resource names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant