Documentation ¶
Index ¶
- Constants
- func CheckMachineStatus(ctx context.Context, machineObj *v1alpha5.Machine, kubeClient client.Client) error
- func CreateMachine(ctx context.Context, machineObj *v1alpha5.Machine, kubeClient client.Client) error
- func GenerateMachineManifest(ctx context.Context, storageRequirement string, ...) *v1alpha5.Machine
- func ListMachinesByWorkspace(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) (*v1alpha5.MachineList, error)
- func WaitForPendingMachines(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) error
Constants ¶
View Source
const ( ProvisionerName = "default" LabelGPUProvisionerCustom = "kaito.sh/machine-type" LabelProvisionerName = "karpenter.sh/provisioner-name" )
Variables ¶
This section is empty.
Functions ¶
func CheckMachineStatus ¶
func CheckMachineStatus(ctx context.Context, machineObj *v1alpha5.Machine, kubeClient client.Client) error
CheckMachineStatus checks the status of the machine. If the machine is not ready, then it will wait for the machine to be ready. If the machine is not ready after the timeout, then it will return an error. if the machine is ready, then it will return nil.
func CreateMachine ¶
func CreateMachine(ctx context.Context, machineObj *v1alpha5.Machine, kubeClient client.Client) error
CreateMachine creates a machine object.
func GenerateMachineManifest ¶
func GenerateMachineManifest(ctx context.Context, storageRequirement string, workspaceObj *kaitov1alpha1.Workspace) *v1alpha5.Machine
GenerateMachineManifest generates a machine object from the given workspace.
func ListMachinesByWorkspace ¶
func ListMachinesByWorkspace(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, kubeClient client.Client) (*v1alpha5.MachineList, error)
ListMachinesByWorkspace list all machine objects in the cluster that are created by the workspace identified by the label.
func WaitForPendingMachines ¶
func WaitForPendingMachines(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, kubeClient client.Client) error
WaitForPendingMachines checks if the there are any machines in provisioning condition. If so, wait until they are ready.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.