variables

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package variables implements validation and defaulting for ClusterClass variables.

Index

Constants

View Source
const (

	// StaticEstimatedCostLimit represents the largest-allowed static CEL cost on a per-expression basis.
	StaticEstimatedCostLimit = apiextensionsvalidation.StaticEstimatedCostLimit
	// StaticEstimatedCRDCostLimit represents the largest-allowed total cost for the x-kubernetes-validations rules of a variable.
	StaticEstimatedCRDCostLimit = apiextensionsvalidation.StaticEstimatedCRDCostLimit
)

Variables

This section is empty.

Functions

func DefaultClusterVariables

func DefaultClusterVariables(values []clusterv1.ClusterVariable, definitions []clusterv1.ClusterClassStatusVariable, fldPath *field.Path) ([]clusterv1.ClusterVariable, field.ErrorList)

DefaultClusterVariables defaults ClusterVariables.

func DefaultMachineVariables added in v1.6.0

func DefaultMachineVariables(values []clusterv1.ClusterVariable, definitions []clusterv1.ClusterClassStatusVariable, fldPath *field.Path) ([]clusterv1.ClusterVariable, field.ErrorList)

DefaultMachineVariables defaults MachineDeploymentVariables and MachinePoolVariables.

func ValidateClusterClassVariables

func ValidateClusterClassVariables(ctx context.Context, oldClusterClassVariables, clusterClassVariables []clusterv1.ClusterClassVariable, fldPath *field.Path) field.ErrorList

ValidateClusterClassVariables validates clusterClassVariable.

func ValidateClusterVariable

func ValidateClusterVariable(ctx context.Context, value, oldValue *clusterv1.ClusterVariable, definition *clusterv1.ClusterClassVariable, fldPath *field.Path) field.ErrorList

ValidateClusterVariable validates a clusterVariable.

func ValidateClusterVariables

func ValidateClusterVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, definitions []clusterv1.ClusterClassStatusVariable, fldPath *field.Path) field.ErrorList

ValidateClusterVariables validates ClusterVariables based on the definitions in ClusterClass `.status.variables`.

func ValidateControlPlaneVariables added in v1.7.3

func ValidateControlPlaneVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, definitions []clusterv1.ClusterClassStatusVariable, fldPath *field.Path) field.ErrorList

ValidateControlPlaneVariables validates ControlPLane variables.

func ValidateMachineVariables added in v1.6.0

func ValidateMachineVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, definitions []clusterv1.ClusterClassStatusVariable, fldPath *field.Path) field.ErrorList

ValidateMachineVariables validates MachineDeployment and MachinePool variables.

Types

type OpenAPISchemaErrorList added in v1.8.0

type OpenAPISchemaErrorList struct {
	SchemaErrors field.ErrorList
	CELErrors    field.ErrorList
}

OpenAPISchemaErrorList tracks validation errors reported with CEL related errors kept separate from schema related errors.

func (*OpenAPISchemaErrorList) AllErrors added in v1.8.0

func (o *OpenAPISchemaErrorList) AllErrors() field.ErrorList

AllErrors returns a list containing both schema and CEL errors.

func (*OpenAPISchemaErrorList) AppendErrors added in v1.8.0

func (o *OpenAPISchemaErrorList) AppendErrors(list *OpenAPISchemaErrorList)

AppendErrors appends all errors in the provided list with the errors of this list.

Jump to

Keyboard shortcuts

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