Documentation ¶
Overview ¶
Package norm provides normalization routines for making arbitrary text compatible with Kubernetes's field requirements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyDNSLabelName ¶
AnyDNSLabelName normalizes a raw string so that it conforms to the structure of a DNS label: it must be all lowercase, contain only alphanumeric characters and dashes, and the first and last characters must be alphameric.
func AnyDNSLabelNameSuffixed ¶ added in v0.2.0
AnyDNSLabelNameSuffixed calls AnyDNSLabelName ensuring that the entirety of the given suffix is retained if possible.
func AnyDNSSubdomainName ¶
AnyDNSSubdomainName normalizes a raw string so that it conforms to the structure of a DNS domain: it must be all lowercase; contain only alphanumeric characters, dashes, and dots; and the first and last characters must be alphameric.
func MetaGenerateName ¶
MetaGenerateName normalizes a Kubernetes metadata generateName field. It is opinionated in that it also forces a dash before the five characters generated by the Kubernetes API.
func MetaNameSuffixed ¶ added in v0.2.0
MetaNameSuffixed normalizes a Kubernetes metadata name field ensuring that the entirety of the given suffix is retained if possible.
Types ¶
This section is empty.