Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxLabelLength = 63 // see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names MaxNameLength = 253 // see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names StartCharacters = 16 EndCharacters = 16 )
Variables ¶
This section is empty.
Functions ¶
func NormalizeLabelValue ¶
NormalizeLabelValue normalizes and shortens the given label value to fit within MaxLabelLength.
func NormalizeNameValue ¶
NormalizeNameValue normalizes and shortens the given name value to fit within MaxNameLength.
func NormalizeValue ¶
NormalizeValue normalizes the given value by replacing unwanted characters with hyphens, converting to lowercase, and trimming leading/trailing hyphens.
func ShortenValue ¶
ShortenValue shortens the given value to fit within maxLen by keeping the first and last parts and replacing the middle part with a hash if necessary. Returns true if the value was shortened, false otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.