validation

package
v0.0.0-...-35c3564 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAPIServer

func ValidateAPIServer(a *kubeadm.APIServer, fldPath *field.Path) field.ErrorList

ValidateAPIServer validates a APIServer object and collects all encountered errors

func ValidateAbsolutePath

func ValidateAbsolutePath(path string, fldPath *field.Path) field.ErrorList

ValidateAbsolutePath validates whether provided path is absolute or not

func ValidateBootstrapTokens

func ValidateBootstrapTokens(bts []bootstraptokenv1.BootstrapToken, fldPath *field.Path) field.ErrorList

ValidateBootstrapTokens validates a slice of BootstrapToken objects

func ValidateCertSANs

func ValidateCertSANs(altnames []string, fldPath *field.Path) field.ErrorList

ValidateCertSANs validates alternative names

func ValidateClusterConfiguration

func ValidateClusterConfiguration(c *kubeadm.ClusterConfiguration) field.ErrorList

ValidateClusterConfiguration validates an ClusterConfiguration object and collects all encountered errors

func ValidateDiscovery

func ValidateDiscovery(d *kubeadm.Discovery, fldPath *field.Path) field.ErrorList

ValidateDiscovery validates discovery related configuration and collects all encountered errors

func ValidateDiscoveryBootstrapToken

func ValidateDiscoveryBootstrapToken(b *kubeadm.BootstrapTokenDiscovery, fldPath *field.Path) field.ErrorList

ValidateDiscoveryBootstrapToken validates bootstrap token discovery configuration

func ValidateDiscoveryFile

func ValidateDiscoveryFile(f *kubeadm.FileDiscovery, fldPath *field.Path) field.ErrorList

ValidateDiscoveryFile validates file discovery configuration

func ValidateDiscoveryKubeConfigPath

func ValidateDiscoveryKubeConfigPath(discoveryFile string, fldPath *field.Path) field.ErrorList

ValidateDiscoveryKubeConfigPath validates location of a discovery file

func ValidateDiscoveryTokenAPIServer

func ValidateDiscoveryTokenAPIServer(apiServer string, fldPath *field.Path) field.ErrorList

ValidateDiscoveryTokenAPIServer validates discovery token for API server

func ValidateEtcd

func ValidateEtcd(e *kubeadm.Etcd, fldPath *field.Path) field.ErrorList

ValidateEtcd validates the .Etcd sub-struct.

func ValidateHostPort

func ValidateHostPort(endpoint string, fldPath *field.Path) field.ErrorList

ValidateHostPort validates host[:port] endpoints

func ValidateIPFromString

func ValidateIPFromString(ipaddr string, fldPath *field.Path) field.ErrorList

ValidateIPFromString validates ip address

func ValidateIPNetFromString

func ValidateIPNetFromString(subnetStr string, minAddrs int64, fldPath *field.Path) field.ErrorList

ValidateIPNetFromString validates network portion of ip address

func ValidateIgnorePreflightErrors

func ValidateIgnorePreflightErrors(ignorePreflightErrorsFromCLI []string) (sets.Set[string], error)

ValidateIgnorePreflightErrors validates duplicates in: - ignore-preflight-errors flag and - ignorePreflightErrors field in {Init,Join}Configuration files.

func ValidateImageRepository

func ValidateImageRepository(imageRepository string, fldPath *field.Path) field.ErrorList

ValidateImageRepository validates the image repository format

func ValidateInitConfiguration

func ValidateInitConfiguration(c *kubeadm.InitConfiguration) field.ErrorList

ValidateInitConfiguration validates an InitConfiguration object and collects all encountered errors

func ValidateJoinConfiguration

func ValidateJoinConfiguration(c *kubeadm.JoinConfiguration) field.ErrorList

ValidateJoinConfiguration validates node configuration and collects all encountered errors

func ValidateJoinControlPlane

func ValidateJoinControlPlane(c *kubeadm.JoinControlPlane, fldPath *field.Path) field.ErrorList

ValidateJoinControlPlane validates joining control plane configuration and collects all encountered errors

func ValidateMixedArguments

func ValidateMixedArguments(flag *pflag.FlagSet) error

ValidateMixedArguments validates passed arguments

func ValidateNetworking

func ValidateNetworking(c *kubeadm.ClusterConfiguration, fldPath *field.Path) field.ErrorList

ValidateNetworking validates networking configuration

func ValidateNodeRegistrationOptions

func ValidateNodeRegistrationOptions(nro *kubeadm.NodeRegistrationOptions, fldPath *field.Path) field.ErrorList

ValidateNodeRegistrationOptions validates the NodeRegistrationOptions object

func ValidatePodSubnetNodeMask

func ValidatePodSubnetNodeMask(subnetStr string, c *kubeadm.ClusterConfiguration, fldPath *field.Path) field.ErrorList

ValidatePodSubnetNodeMask validates that the relation between podSubnet and node-masks is correct

func ValidatePort

func ValidatePort(port int32, fldPath *field.Path) field.ErrorList

ValidatePort validates port numbers

func ValidateServiceSubnetSize

func ValidateServiceSubnetSize(subnetStr string, fldPath *field.Path) field.ErrorList

ValidateServiceSubnetSize validates that the maximum subnet size is not exceeded Should be a small cidr due to how it is stored in etcd. bigger cidr (specially those offered by IPv6) will add no value and significantly increase snapshotting time. NOTE: This is identical to validation performed in the apiserver.

func ValidateSocketPath

func ValidateSocketPath(socket string, fldPath *field.Path) field.ErrorList

ValidateSocketPath validates format of socket path or url

func ValidateToken

func ValidateToken(token string, fldPath *field.Path) field.ErrorList

ValidateToken validates a Bootstrap Token

func ValidateTokenGroups

func ValidateTokenGroups(usages []string, groups []string, fldPath *field.Path) field.ErrorList

ValidateTokenGroups validates token groups

func ValidateTokenUsages

func ValidateTokenUsages(usages []string, fldPath *field.Path) field.ErrorList

ValidateTokenUsages validates token usages

func ValidateURLs

func ValidateURLs(urls []string, requireHTTPS bool, fldPath *field.Path) field.ErrorList

ValidateURLs validates the URLs given in the string slice, makes sure they are parsable. Optionally, it can enforces HTTPS usage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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