validation

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCluster

func ValidateCluster(cluster *api.Cluster) field.ErrorList

ValidateCluster tests if required fields in the Cluster are set.

func ValidateClusterAPIEndpoint

func ValidateClusterAPIEndpoint(fldPath *field.Path, apiEndpoint string, forceHTTPS bool) field.ErrorList

ValidateClusterAPIEndpoint validates cluster's apiEndpoint

func ValidateClusterName

func ValidateClusterName(name string) []string

ValidateClusterName tests whether the cluster name passed is valid. If the cluster name is not valid, a list of error strings is returned. Otherwise an empty list (or nil) is returned. Rules of a valid cluster name: - Must be a valid label value as per RFC1123.

  • An alphanumeric (a-z, and 0-9) string, with a maximum length of 63 characters, with the '-' character allowed anywhere except the first or last character.

- Length must be less than 48 characters.

  • Since cluster name used to generate execution namespace by adding a prefix, so reserve 15 characters for the prefix.

func ValidateClusterProxyURL

func ValidateClusterProxyURL(fldPath *field.Path, proxyURL string) field.ErrorList

ValidateClusterProxyURL validates cluster's proxyURL.

func ValidateClusterResourceModels added in v1.3.0

func ValidateClusterResourceModels(fldPath *field.Path, models []api.ResourceModel) *field.Error

ValidateClusterResourceModels validates cluster's resource models.

func ValidateClusterSpec

func ValidateClusterSpec(spec *api.ClusterSpec, fldPath *field.Path) field.ErrorList

ValidateClusterSpec tests if required fields in the ClusterSpec are set.

func ValidateClusterUpdate

func ValidateClusterUpdate(newCluster, oldCluster *api.Cluster) field.ErrorList

ValidateClusterUpdate tests if required fields in the Cluster are set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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