Documentation ¶
Overview ¶
Package variables implements validation and defaulting for ClusterClass variables.
Index ¶
- Constants
- func DefaultClusterVariables(values []clusterv1.ClusterVariable, ...) ([]clusterv1.ClusterVariable, field.ErrorList)
- func DefaultMachineVariables(values []clusterv1.ClusterVariable, ...) ([]clusterv1.ClusterVariable, field.ErrorList)
- func ValidateClusterClassVariables(ctx context.Context, ...) field.ErrorList
- func ValidateClusterVariable(ctx context.Context, value, oldValue *clusterv1.ClusterVariable, ...) field.ErrorList
- func ValidateClusterVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, ...) field.ErrorList
- func ValidateControlPlaneVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, ...) field.ErrorList
- func ValidateMachineVariables(ctx context.Context, values, oldValues []clusterv1.ClusterVariable, ...) field.ErrorList
- type OpenAPISchemaErrorList
Constants ¶
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
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.