Documentation ¶
Index ¶
- Constants
- func RegisterSupportedOSList(list []string)
- func ValidatClusterSpec(platformClient platformv1client.PlatformV1Interface, clusterName string, ...) field.ErrorList
- func ValidateCIDRs(cls *platform.Cluster, specPath *field.Path) field.ErrorList
- func ValidateCSIOperator(csioperator *platform.CSIOperatorFeature, fldPath *field.Path) field.ErrorList
- func ValidateCephFS(cls *platform.Cluster, fld *field.Path) field.ErrorList
- func ValidateCluster(platformClient platformv1client.PlatformV1Interface, obj *types.Cluster) field.ErrorList
- func ValidateClusterFeature(spec *platform.ClusterSpec, fldPath *field.Path) field.ErrorList
- func ValidateClusterGPUMachines(machines []platform.ClusterMachine, fldPath *field.Path) field.ErrorList
- func ValidateClusterMachines(cls *platform.Cluster, fldPath *field.Path) field.ErrorList
- func ValidateClusterProperty(spec *platform.ClusterSpec, propPath *field.Path) field.ErrorList
- func ValidateClusterScale(cluster *platform.Cluster, oldCluster *platform.Cluster, fldPath *field.Path) field.ErrorList
- func ValidateClusterSpecVersion(platformClient platformv1client.PlatformV1Interface, clsName, version string, ...) field.ErrorList
- func ValidateClusterUpdate(platformClient platformv1client.PlatformV1Interface, cluster *types.Cluster, ...) field.ErrorList
- func ValidateDefaultRoute(fldPath *field.Path, sshs []*ssh.SSH, expectedNetInterface string) field.ErrorList
- func ValidateFirewall(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateIPVS(spec *platform.ClusterSpec, ipvs *bool, fldPath *field.Path) field.ErrorList
- func ValidateMachine(machine *platform.Machine, cluster *platformv1.Cluster, ...) field.ErrorList
- func ValidateMachineResourceCPU(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateMachineResourceDiskLib(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateMachineResourceDiskLog(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateMachineResourceMemory(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateMachineSpec(spec *platform.MachineSpec, cluster *platformv1.Cluster, fldPath *field.Path, ...) field.ErrorList
- func ValidateMachineWithCluster(ctx context.Context, ip string, fldPath *field.Path, ...) field.ErrorList
- func ValidateMasterTimeOffset(fldPath *field.Path, masters []*ssh.SSH) field.ErrorList
- func ValidateNFS(cls *platform.Cluster, fld *field.Path) field.ErrorList
- func ValidateOSVersion(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateProxy(fldPath *field.Path, proxy ssh.Proxy) field.ErrorList
- func ValidateReservePorts(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateSSH(fldPath *field.Path, ip string, port int, user string, password []byte, ...) field.ErrorList
- func ValidateSelinux(fldPath *field.Path, sshs []*ssh.SSH) field.ErrorList
- func ValidateStorage(cls *platform.Cluster, fld *field.Path) field.ErrorList
- func ValidateWorkerTimeOffset(fldPath *field.Path, worker *ssh.SSH, masters []*ssh.SSH) field.ErrorList
- type CephCsiCephfs
- type CephCsiSecret
- type CsiConfig
- type Nfs
- type NfsSubdirExternalProvisioner
- type StorageClass
- type StorageGlobalCfg
- type StorageInfo
- type StorageOverrideValue
- type TKEValidateResult
Constants ¶
const ( AnywhereValidateItemTunnelConnectivity = "TunnelConnectivity" AnywhereValidateItemSSH = "SSH" AnywhereValidateItemTimeDiff = "TimeDiff" AnywhereValidateItemOSVersion = "OS" AnywhereValidateItemMachineResourceDiskLib = "MachineResourceDiskLib" AnywhereValidateItemMachineResourceDiskLog = "MachineResourceDiskLog" AnywhereValidateItemMachineResourceCPU = "MachineResourceCPU" AnywhereValidateItemMachineResourceMemory = "MachineResourceMemory" AnywhereValidateItemDefaultRoute = "DefaultRoute" AnywhereValidateItemReservePorts = "ReservePorts" AnywhereValidateItemHostNetOverlapping = "HostNetOverlapping" AnywhereValidateItemFirewall = "Firewall" AnywhereValidateItemSelinux = "Selinux" AnywhereValidateItemStorage = "Storage" // validate all items AnywhereValidateItemAll = "All" )
const ( MachineResourceRequstDiskPath = "/var/lib" MachineResourceRequstLogDiskPath = "/var/log" MachineResourceRequstDiskSpace = 100 // GiB MachineResourceRequstLogDiskSpace = 10 // GiB MachineResourceRequstCPU = 4 MachineResourceRequstMemory = 8 // GiB )
const MaxTimeOffset = 5
Variables ¶
This section is empty.
Functions ¶
func RegisterSupportedOSList ¶ added in v1.9.1
func RegisterSupportedOSList(list []string)
func ValidatClusterSpec ¶
func ValidatClusterSpec(platformClient platformv1client.PlatformV1Interface, clusterName string, cls *platform.Cluster, fldPath *field.Path, phase platform.ClusterPhase, validateMachine bool) field.ErrorList
ValidatClusterSpec validates a given ClusterSpec.
func ValidateCIDRs ¶
ValidateCIDRs validates clusterCIDR and serviceCIDR.
func ValidateCSIOperator ¶ added in v1.3.1
func ValidateCephFS ¶ added in v1.9.1
func ValidateCluster ¶
func ValidateCluster(platformClient platformv1client.PlatformV1Interface, obj *types.Cluster) field.ErrorList
ValidateCluster validates a given Cluster.
func ValidateClusterFeature ¶ added in v1.3.1
func ValidateClusterGPUMachines ¶ added in v1.9.0
func ValidateClusterGPUMachines(machines []platform.ClusterMachine, fldPath *field.Path) field.ErrorList
ValidateClusterGPUMachines validates a given GPUMachines.
func ValidateClusterMachines ¶
ValidateClusterMachines validates a given CluterMachines.
func ValidateClusterProperty ¶
ValidateClusterProperty validates a given ClusterProperty.
func ValidateClusterScale ¶ added in v1.9.0
func ValidateClusterScale(cluster *platform.Cluster, oldCluster *platform.Cluster, fldPath *field.Path) field.ErrorList
ValidateClusterScale tests if master scale up/down to a cluster is valid.
func ValidateClusterSpecVersion ¶
func ValidateClusterSpecVersion(platformClient platformv1client.PlatformV1Interface, clsName, version string, fldPath *field.Path, phase platform.ClusterPhase) field.ErrorList
ValidateClusterSpecVersion validates a given version.
func ValidateClusterUpdate ¶ added in v1.9.0
func ValidateClusterUpdate(platformClient platformv1client.PlatformV1Interface, cluster *types.Cluster, oldCluster *types.Cluster) field.ErrorList
ValidateCluster validates a given Cluster.
func ValidateDefaultRoute ¶ added in v1.9.1
func ValidateFirewall ¶ added in v1.9.1
func ValidateIPVS ¶ added in v1.6.0
func ValidateMachine ¶
func ValidateMachine(machine *platform.Machine, cluster *platformv1.Cluster, platformClient platformv1client.PlatformV1Interface) field.ErrorList
ValidateMachine validates a given machine.
func ValidateMachineResourceCPU ¶ added in v1.9.1
func ValidateMachineResourceDiskLib ¶ added in v1.9.1
func ValidateMachineResourceDiskLog ¶ added in v1.9.1
func ValidateMachineResourceMemory ¶ added in v1.9.1
func ValidateMachineSpec ¶
func ValidateMachineSpec(spec *platform.MachineSpec, cluster *platformv1.Cluster, fldPath *field.Path, platformClient platformv1client.PlatformV1Interface) field.ErrorList
ValidateMachineSpec validates a given machine spec.
func ValidateMachineWithCluster ¶ added in v1.9.0
func ValidateMachineWithCluster(ctx context.Context, ip string, fldPath *field.Path, cluster *platformv1.Cluster, platformClient platformv1client.PlatformV1Interface) field.ErrorList
ValidateMachineWithCluster validates a given machine by ip with cluster.
func ValidateMasterTimeOffset ¶ added in v1.9.0
ValidateMasterTimeOffset validates a given master time offset.
func ValidateNFS ¶ added in v1.9.1
func ValidateOSVersion ¶ added in v1.9.1
func ValidateProxy ¶ added in v1.9.1
func ValidateReservePorts ¶ added in v1.9.1
func ValidateSSH ¶ added in v1.9.0
func ValidateSSH(fldPath *field.Path, ip string, port int, user string, password []byte, privateKey []byte, passPhrase []byte, proxy ssh.Proxy) field.ErrorList
ValidateSSH validates a given ssh config.
func ValidateSelinux ¶ added in v1.9.1
func ValidateStorage ¶ added in v1.9.1
Types ¶
type CephCsiCephfs ¶ added in v1.9.1
type CephCsiCephfs struct { CsiConfig []CsiConfig `json:"csiConfig"` StorageClass StorageClass `json:"storageClass"` Secret CephCsiSecret `json:"secret"` }
type CephCsiSecret ¶ added in v1.9.1
type NfsSubdirExternalProvisioner ¶ added in v1.9.1
type NfsSubdirExternalProvisioner struct {
Nfs Nfs `json:"nfs"`
}
type StorageClass ¶ added in v1.9.1
type StorageGlobalCfg ¶ added in v1.9.1
type StorageInfo ¶ added in v1.9.1
func GetStorageInfo ¶ added in v1.9.1
func GetStorageInfo(annoData []byte) (*StorageInfo, error)
type StorageOverrideValue ¶ added in v1.9.1
type StorageOverrideValue struct { Global StorageGlobalCfg `json:"global"` NfsSubdirExternalProvisioner NfsSubdirExternalProvisioner `json:"nfs-subdir-external-provisioner"` CephCsiCephfs CephCsiCephfs `json:"ceph-csi-cephfs"` }
StorageOverrideValue contains all the storage info used to validate from localization OverrideConfig
type TKEValidateResult ¶ added in v1.9.1
type TKEValidateResult struct { Name string `json:"Name"` Description string `json:"Description"` Checked bool `json:"Checked"` Passed bool `json:"Passed"` ErrorList field.ErrorList `json:"-"` Detail string `json:"Detail"` }
func (TKEValidateResult) ToFieldError ¶ added in v1.9.1
func (r TKEValidateResult) ToFieldError() *field.Error