Documentation ¶
Overview ¶
Package names collects functions encapsulating the rules for constructing a variety of kube resource names
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDNS1123SubDomainName ¶
GenerateDNS1123SubDomainName joins the input strings with dots (".") and returns the result, suitably truncated to the maximum length allowed for the domain names.
func GenerateResourceName ¶ added in v0.0.22
GenerateResourceName joins the input strings with dots (".") and returns the result, suitably truncated to the maximum length of kube resource names.
func IngressName ¶ added in v0.0.22
IngressName returns the name of a kube ingress derived from the base string. It ensures that things like leading digits are sufficiently hidden to prevent kube from erroring out on the name. It also replaces "/" characters with "-" to produce a valid resource name from a route (which may contain "/" characters).
func ServiceName ¶ added in v0.0.22
ServiceName returns the name of a kube service derived from the base string. It ensures that things like leading digits are sufficiently hidden to prevent kube from erroring out on the name.
func TruncateMD5 ¶
TruncateMD5 truncates the input string s to the maxLen, if necessary. Shorter strings are passed through unchanged. Truncation is done by computing an MD5 hash over the __entire__ string and then combining it with the (maxLen-32)-sized prefix of the input. This result in a string of exactly maxLen characters. The magic 32 is the length of the 16 byte MD5 hash in hex characters.
Types ¶
This section is empty.