Documentation
¶
Index ¶
- Constants
- func ValidatClusterSpec(spec *platform.ClusterSpec, fldPath *field.Path) field.ErrorList
- func ValidateClusteType(clusterType string, fldPath *field.Path) field.ErrorList
- func ValidateCluster(cluster *types.Cluster) field.ErrorList
- func ValidateClusterByProvider(cluster *types.Cluster) field.ErrorList
- func ValidateClusterCredential(ctx context.Context, credential *platform.ClusterCredential, ...) field.ErrorList
- func ValidateClusterFeature(feature *platform.ClusterFeature, fldPath *field.Path) field.ErrorList
- func ValidateClusterMachines(machines []platform.ClusterMachine, fldPath *field.Path) field.ErrorList
- func ValidateClusterName(ctx context.Context, clusterName string, fldPath *field.Path, ...) field.ErrorList
- func ValidateClusterUpdate(cluster *types.Cluster, oldCluster *types.Cluster) field.ErrorList
- func ValidateFiles(files []platform.File, fldPath *field.Path) field.ErrorList
- func ValidateGPUType(gpuType *platform.GPUType, fldPath *field.Path) field.ErrorList
- func ValidateHA(ha *platform.HA, fldPath *field.Path) field.ErrorList
- func ValidateHooks(hooks map[platform.HookType]string, fldPath *field.Path, files []platform.File, ...) field.ErrorList
- func ValidateMachine(ctx context.Context, machine *platform.Machine, ...) field.ErrorList
- func ValidateMachineByProvider(machine *platform.Machine) field.ErrorList
- func ValidateMachineSpec(ctx context.Context, spec *platform.MachineSpec, fldPath *field.Path, ...) field.ErrorList
- func ValidateMachineSpecType(machineType string, fldPath *field.Path) field.ErrorList
- func ValidateMachineUpdate(ctx context.Context, machine *platform.Machine, oldMachine *platform.Machine) field.ErrorList
- func ValidateMachineWithCluster(ctx context.Context, ip string, fldPath *field.Path, cluster *platform.Cluster, ...) field.ErrorList
- func ValidateMasterTimeOffset(fldPath *field.Path, masters []*ssh.SSH) field.ErrorList
- func ValidateSSH(fldPath *field.Path, ip string, port int, user string, password []byte, ...) field.ErrorList
- func ValidateUpdateClusterCredential(ctx context.Context, newObj *platform.ClusterCredential, ...) field.ErrorList
- func ValidateWorkerTimeOffset(fldPath *field.Path, worker *ssh.SSH, masters []*ssh.SSH) field.ErrorList
Constants ¶
const MaxTimeOffset = 5 * 300
Variables ¶
This section is empty.
Functions ¶
func ValidatClusterSpec ¶
ValidateCluster validates a given ClusterSpec.
func ValidateClusteType ¶
ValidateClusteType validates a given type.
func ValidateCluster ¶
ValidateCluster validates a given Cluster.
func ValidateClusterByProvider ¶
ValidateClusterByProvider validates a given cluster by cluster provider.
func ValidateClusterCredential ¶ added in v1.3.1
func ValidateClusterCredential(ctx context.Context, credential *platform.ClusterCredential, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateClusterCredential validates a given ClusterCredential.
func ValidateClusterFeature ¶
ValidateClusterFeature validates a given ClusterFeature.
func ValidateClusterMachines ¶
func ValidateClusterMachines(machines []platform.ClusterMachine, fldPath *field.Path) field.ErrorList
ValidateClusterMachines validates a given CluterMachines.
func ValidateClusterName ¶
func ValidateClusterName(ctx context.Context, clusterName string, fldPath *field.Path, cluster *platform.Cluster, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateClusterName validates a given clusterName and return cluster if exists.
func ValidateClusterUpdate ¶
ValidateClusterUpdate tests if an update to a cluster is valid.
func ValidateFiles ¶
ValidateFiles validates a given Files.
func ValidateGPUType ¶
ValidateGPUType validates a given GPUType.
func ValidateHA ¶
ValidateHA validates a given HA.
func ValidateHooks ¶
func ValidateHooks(hooks map[platform.HookType]string, fldPath *field.Path, files []platform.File, filesFldPath *field.Path) field.ErrorList
ValidateHooks validates a given Hooks.
func ValidateMachine ¶
func ValidateMachine(ctx context.Context, machine *platform.Machine, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateMachine validates a given machine.
func ValidateMachineByProvider ¶
ValidateMachineByProvider validates a given machine by machine provider.
func ValidateMachineSpec ¶
func ValidateMachineSpec(ctx context.Context, spec *platform.MachineSpec, fldPath *field.Path, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateMachineSpec validates a given machine spec.
func ValidateMachineSpecType ¶
ValidateMachineSpecType validates a given type and call provider.Validate.
func ValidateMachineUpdate ¶
func ValidateMachineUpdate(ctx context.Context, machine *platform.Machine, oldMachine *platform.Machine) field.ErrorList
ValidateMachineUpdate tests if an update to a machine is valid.
func ValidateMachineWithCluster ¶
func ValidateMachineWithCluster(ctx context.Context, ip string, fldPath *field.Path, cluster *platform.Cluster, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateMachineWithCluster validates a given machine by ip with cluster.
func ValidateMasterTimeOffset ¶
ValidateMasterTimeOffset validates a given master time offset.
func ValidateSSH ¶
func ValidateSSH(fldPath *field.Path, ip string, port int, user string, password []byte, privateKey []byte, passPhrase []byte) field.ErrorList
ValidateSSH validates a given ssh config.
func ValidateUpdateClusterCredential ¶ added in v1.3.1
func ValidateUpdateClusterCredential(ctx context.Context, newObj *platform.ClusterCredential, oldObj *platform.ClusterCredential, platformClient platforminternalclient.PlatformInterface) field.ErrorList
ValidateUpdateClusterCredential tests if an update to a ClusterCredential is valid.
Types ¶
This section is empty.