kubernetes

package
v1.8.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShortenLabelValue

func ShortenLabelValue(value string) string

ShortenLabelValue deterministically shortens the provided string value to the maximum allowed length for the value of a Kubernetes label by retaining as many of the leading characters as possible and replacing as many trailing characters as necessary with a short hash of the entire input. The preserved characters of the input value and the short hash will be separated by a dash. If the length of the input name is already less than or equal to the maximum allowed length, then the original value is returned as is.

func ShortenResourceName

func ShortenResourceName(name string) string

ShortenResourceName deterministically shortens the provided name to the maximum allowed length for the name of a Kubernetes resource by retaining as many of the leading characters as possible and replacing as many trailing characters as necessary with a short hash of the entire input. The preserved characters of the input name and the short hash will be separated by a dash. If the length of the input name is already less than or equal to the maximum allowed length, then the original name is returned as is.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL