k8s

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DNS1035LabelMaxLength int = 63

DNS1035LabelMaxLength is a label's max length in DNS (RFC 1035)

View Source
const DNS1123LabelMaxLength int = 63

DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123)

View Source
const DNS1123SubdomainMaxLength int = 253

DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123)

View Source
const LabelValueMaxLength int = 63

LabelValueMaxLength is a label's max length

View Source
const TotalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB

TotalAnnotationSizeLimitB defines the maximum size of all annotations in characters.

Variables

This section is empty.

Functions

func EmptyError

func EmptyError() string

EmptyError returns a string explanation of a "must not be empty" validation failure.

func InclusiveRangeError

func InclusiveRangeError(lo, hi int) string

InclusiveRangeError returns a string explanation of a numeric "must be between" validation failure.

func IsDNS1035Label

func IsDNS1035Label(value string) []string

IsDNS1035Label tests for a string that conforms to the definition of a label in DNS (RFC 1035).

func IsDNS1123Label

func IsDNS1123Label(value string) []string

IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).

func IsDNS1123Subdomain

func IsDNS1123Subdomain(value string) []string

IsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).

func IsQualifiedName

func IsQualifiedName(value string) []string

IsQualifiedName tests whether the value passed is what Kubernetes calls a "qualified name". This is a format used in various places throughout the system. If the value is not valid, a list of error strings is returned. Otherwise an empty list (or nil) is returned.

func IsValidLabelValue

func IsValidLabelValue(value string) []string

IsValidLabelValue tests whether the value passed is a valid label value. If the value is not valid, a list of error strings is returned. Otherwise an empty list (or nil) is returned.

func IsWildcardDNS1123Subdomain

func IsWildcardDNS1123Subdomain(value string) []string

IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a wildcard subdomain in DNS (RFC 1034 section 4.3.3).

func MaxLenError

func MaxLenError(length int) string

MaxLenError returns a string explanation of a "string too long" validation failure.

func RegexError

func RegexError(msg string, fmt string, examples ...string) string

RegexError returns a string explanation of a regex validation failure.

func ValidateAnnotations

func ValidateAnnotations(annotations map[string]string, path string) error

ValidateAnnotations validates that a set of annotations are correctly defined.

func ValidateAnnotationsSize

func ValidateAnnotationsSize(annotations map[string]string) error

ValidateAnnotationsSize validates that a set of annotations is not too large.

Types

This section is empty.

Jump to

Keyboard shortcuts

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