machine

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

View Source
const (
	ProvisionerName               = "default"
	LabelGPUProvisionerCustom     = "kaito.sh/machine-type"
	LabelProvisionerName          = "karpenter.sh/provisioner-name"
	GPUString                     = "gpu"
	ErrorInstanceTypesUnavailable = "all requested instance types were unavailable during launch"
)

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)

ListMachines 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.

Jump to

Keyboard shortcuts

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