labels

package
v1.8.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MPL-2.0 Imports: 7 Imported by: 4

Documentation

Overview

Package labels contains adapter label validation functions from Kubernetes.

We want to avoid dependency of machinery on Kubernetes packages.

Index

Constants

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

TotalAnnotationSizeLimitB is the maximum size of all annotations in bytes.

Variables

This section is empty.

Functions

func Validate

func Validate(labels map[string]string) error

Validate validates that a set of labels are correctly defined.

func ValidateAnnotations added in v1.8.0

func ValidateAnnotations(annotations map[string]string) error

ValidateAnnotations validates that a set of annotations are correctly defined.

func ValidateDNS1123Subdomain

func ValidateDNS1123Subdomain(value string) error

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

func ValidateLabelValue

func ValidateLabelValue(value string) error

ValidateLabelValue 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 ValidateQualifiedName

func ValidateQualifiedName(value string) error

ValidateQualifiedName 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 ValidateTaints added in v1.6.0

func ValidateTaints(taints map[string]string) error

ValidateTaints validates that a set of taints is correctly defined.

Types

This section is empty.

Jump to

Keyboard shortcuts

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