check

package
v1.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package check implements checks for managed topology.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterClassReferencesAreValid

func ClusterClassReferencesAreValid(clusterClass *clusterv1.ClusterClass) field.ErrorList

ClusterClassReferencesAreValid checks that each template reference in the ClusterClass is valid .

func ClusterClassesAreCompatible

func ClusterClassesAreCompatible(current, desired *clusterv1.ClusterClass) field.ErrorList

ClusterClassesAreCompatible checks the compatibility between new and old versions of a Cluster Class. It checks that: 1) InfrastructureCluster Templates are compatible. 2) ControlPlane Templates are compatible. 3) ControlPlane InfrastructureMachineTemplates are compatible. 4) MachineDeploymentClasses have not been deleted and are compatible.

func LocalObjectTemplateIsValid

func LocalObjectTemplateIsValid(template *clusterv1.LocalObjectTemplate, namespace string, pathPrefix *field.Path) field.ErrorList

LocalObjectTemplateIsValid ensures the template is in the correct namespace, has no nil references, and has a valid Kind and GroupVersion.

func LocalObjectTemplatesAreCompatible

func LocalObjectTemplatesAreCompatible(current, desired clusterv1.LocalObjectTemplate, pathPrefix *field.Path) field.ErrorList

LocalObjectTemplatesAreCompatible checks if two referenced objects are compatible, meaning that they are of the same GroupKind and in the same namespace.

func LocalObjectTemplatesAreInSameNamespace

func LocalObjectTemplatesAreInSameNamespace(current, desired clusterv1.LocalObjectTemplate, pathPrefix *field.Path) field.ErrorList

LocalObjectTemplatesAreInSameNamespace checks if two referenced objects are in the same namespace.

func MachineDeploymentClassesAreCompatible

func MachineDeploymentClassesAreCompatible(current, desired *clusterv1.ClusterClass) field.ErrorList

MachineDeploymentClassesAreCompatible checks if each MachineDeploymentClass in the new ClusterClass is a compatible change from the previous ClusterClass. It checks if: 1) Any MachineDeploymentClass has been removed. 2) If the MachineDeploymentClass.Template.Infrastructure reference has changed its Group or Kind.

func MachineDeploymentClassesAreUnique

func MachineDeploymentClassesAreUnique(clusterClass *clusterv1.ClusterClass) field.ErrorList

MachineDeploymentClassesAreUnique checks that no two MachineDeploymentClasses in a ClusterClass share a name.

func MachineDeploymentTopologiesAreValidAndDefinedInClusterClass

func MachineDeploymentTopologiesAreValidAndDefinedInClusterClass(desired *clusterv1.Cluster, clusterClass *clusterv1.ClusterClass) field.ErrorList

MachineDeploymentTopologiesAreValidAndDefinedInClusterClass checks that each MachineDeploymentTopology name is not empty and unique, and each class in use is defined in ClusterClass.spec.Workers.MachineDeployments.

func ObjectsAreCompatible

func ObjectsAreCompatible(current, desired client.Object) field.ErrorList

ObjectsAreCompatible checks if two referenced objects are compatible, meaning that they are of the same GroupKind and in the same namespace.

func ObjectsAreInTheSameNamespace

func ObjectsAreInTheSameNamespace(current, desired client.Object) field.ErrorList

ObjectsAreInTheSameNamespace checks if two referenced objects are in the same namespace.

func ObjectsAreStrictlyCompatible

func ObjectsAreStrictlyCompatible(current, desired client.Object) field.ErrorList

ObjectsAreStrictlyCompatible checks if two referenced objects are strictly compatible, meaning that they are compatible and the name of the objects do not change.

Types

This section is empty.

Jump to

Keyboard shortcuts

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