Skip to content

Conversation

Diaphteiros
Copy link
Contributor

What this PR does / why we need it:
Adds a constant for the maximum k8s name length. This is useful for the shorten function. Also adds a shorten function that does not return an error, but panics instead.

Which issue(s) this PR fixes:
None

Special notes for your reviewer:

Release note:

The `pkg/controller` package now has a constant `K8sMaxNameLength` that holds the maximum length for k8s resource names. This is useful in combination with the package's `ShortenToXCharacters` function.
In addition to the `pkg/controller` package's `ShortenToXCharacters` function, there is now also a `ShortenToXCharactersUnsafe` function which panics instead of returning an error if something goes wrong.

@Diaphteiros Diaphteiros merged commit 911636c into main Sep 16, 2025
8 checks passed
@Diaphteiros Diaphteiros deleted the k8s-maxlen branch September 16, 2025 14:33
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.

2 participants