validation

package
v2.21.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCloudChangeNotAllowed describes that it is not allowed to change the cloud provider.
	ErrCloudChangeNotAllowed = errors.New("not allowed to change the cloud provider")

	// UnsafeCNIUpgradeLabel allows unsafe CNI version upgrade (difference in versions more than one minor version).
	UnsafeCNIUpgradeLabel = "unsafe-cni-upgrade"
	// UnsafeCNIMigrationLabel allows unsafe CNI type migration.
	UnsafeCNIMigrationLabel = "unsafe-cni-migration"

	// MaxClusterNameLength is the maximum allowed length for cluster names.
	// This is restricted by the many uses of cluster names, from embedding
	// them in namespace names (and prefixing them) to using them in role
	// names (when using AWS).
	// AWS role names have a max length of 64 characters, "kubernetes-" and
	// "-control-plane" being added by KKP. This leaves 39 usable characters
	// and to give some wiggle room, we define the max length to be 36.
	MaxClusterNameLength = 36
)

Functions

func GetCronExpressionParser added in v2.21.0

func GetCronExpressionParser() cron.Parser

func ValidateApplicationDefinitionSpec added in v2.21.0

func ValidateApplicationDefinitionSpec(ad appskubermaticv1.ApplicationDefinition) field.ErrorList

func ValidateApplicationDefinitionUpdate added in v2.21.0

func ValidateApplicationDefinitionUpdate(newAd appskubermaticv1.ApplicationDefinition, oldAd appskubermaticv1.ApplicationDefinition) field.ErrorList

func ValidateApplicationDefinitionWithOpenAPI added in v2.21.0

func ValidateApplicationDefinitionWithOpenAPI(ad appskubermaticv1.ApplicationDefinition, parentFieldPath *field.Path) field.ErrorList

func ValidateApplicationInstallationSpec added in v2.21.0

func ValidateApplicationInstallationSpec(ctx context.Context, client ctrlruntimeclient.Client, spec appskubermaticv1.ApplicationInstallationSpec) field.ErrorList

ValidateApplicationInstallationSpec validates the ApplicationInstallation Spec.

func ValidateApplicationInstallationUpdate added in v2.21.0

func ValidateApplicationInstallationUpdate(ctx context.Context, client ctrlruntimeclient.Client, newAI, oldAI appskubermaticv1.ApplicationInstallation) field.ErrorList

ValidateApplicationInstallationUpdate validates the new ApplicationInstallation for immutable fields.

func ValidateApplicationVersions added in v2.21.0

func ValidateApplicationVersions(vs []appskubermaticv1.ApplicationVersion, parentFieldPath *field.Path) []*field.Error

func ValidateCloudChange

func ValidateCloudChange(newSpec, oldSpec kubermaticv1.CloudSpec) error

ValidateCloudChange validates if the cloud provider has been changed.

func ValidateCloudSpec

func ValidateCloudSpec(spec kubermaticv1.CloudSpec, dc *kubermaticv1.Datacenter, ipFamily kubermaticv1.IPFamily, parentFieldPath *field.Path, externalCCM bool) field.ErrorList

ValidateCloudSpec validates if the cloud spec is valid If this is not called from within another validation routine, parentFieldPath can be nil.

func ValidateClusterNetworkConfig added in v2.18.0

func ValidateClusterSpec added in v2.19.0

func ValidateClusterSpec(spec *kubermaticv1.ClusterSpec, dc *kubermaticv1.Datacenter, enabledFeatures features.FeatureGate, versions []*version.Version, parentFieldPath *field.Path) field.ErrorList

ValidateClusterSpec validates the given cluster spec. If this is not called from within another validation routine, parentFieldPath can be nil.

func ValidateClusterTemplate added in v2.21.0

func ValidateClusterTemplate(ctx context.Context, template *kubermaticv1.ClusterTemplate, dc *kubermaticv1.Datacenter, cloudProvider provider.CloudProvider, enabledFeatures features.FeatureGate, versionManager *version.Manager, parentFieldPath *field.Path) field.ErrorList

ValidateClusterTemplate validates a kubermaticv1.ClusterTemplate resource. For the moment, this only validates ClusterTemplates not used for default cluster templates in Seeds because those are a special case.

func ValidateClusterUpdate added in v2.19.0

func ValidateClusterUpdate(ctx context.Context, newCluster, oldCluster *kubermaticv1.Cluster, dc *kubermaticv1.Datacenter, cloudProvider provider.CloudProvider, versionManager *version.Manager, features features.FeatureGate) field.ErrorList

ValidateClusterUpdate validates the new cluster and if no forbidden changes were attempted.

func ValidateContainerRuntime added in v2.18.0

func ValidateContainerRuntime(spec *kubermaticv1.ClusterSpec) error

func ValidateCreateNodeSpec

func ValidateCreateNodeSpec(c *kubermaticv1.Cluster, spec *apiv1.NodeSpec, dc *kubermaticv1.Datacenter) error

func ValidateKubermaticConfigurationSpec added in v2.21.0

func ValidateKubermaticConfigurationSpec(spec *kubermaticv1.KubermaticConfigurationSpec) field.ErrorList

func ValidateKubermaticVersioningConfiguration added in v2.21.0

func ValidateKubermaticVersioningConfiguration(config kubermaticv1.KubermaticVersioningConfiguration, parentFieldPath *field.Path) field.ErrorList

func ValidateLeaderElectionSettings added in v2.16.4

func ValidateLeaderElectionSettings(l *kubermaticv1.LeaderElectionSettings, fldPath *field.Path) field.ErrorList

func ValidateMeteringConfiguration added in v2.21.0

func ValidateMeteringConfiguration(configuration *kubermaticv1.MeteringConfiguration) error

func ValidateNewClusterSpec added in v2.19.0

func ValidateNewClusterSpec(ctx context.Context, spec *kubermaticv1.ClusterSpec, dc *kubermaticv1.Datacenter, cloudProvider provider.CloudProvider, versionManager *version.Manager, enabledFeatures features.FeatureGate, parentFieldPath *field.Path) field.ErrorList

func ValidateNodePortRange added in v2.17.1

func ValidateNodePortRange(nodePortRange string, fldPath *field.Path) *field.Error

func ValidateUpdateWindow

func ValidateUpdateWindow(updateWindow *kubermaticv1.UpdateWindow) error

func ValidateUser added in v2.21.0

func ValidateUser(u *kubermaticv1.User) field.ErrorList

func ValidateUserCreate added in v2.21.0

func ValidateUserCreate(user *kubermaticv1.User) field.ErrorList

func ValidateUserSSHKey added in v2.21.0

func ValidateUserSSHKey(key *kubermaticv1.UserSSHKey) field.ErrorList

func ValidateUserSSHKeyCreate added in v2.21.0

func ValidateUserSSHKeyCreate(key *kubermaticv1.UserSSHKey) field.ErrorList

func ValidateUserSSHKeyUpdate added in v2.21.0

func ValidateUserSSHKeyUpdate(oldKey, newKey *kubermaticv1.UserSSHKey) field.ErrorList

func ValidateUserUpdate added in v2.21.0

func ValidateUserUpdate(oldUser, newUser *kubermaticv1.User) field.ErrorList

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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