Documentation
¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Constants
- func CheckNvidiaPlugin(ctx context.Context, nodeObj *corev1.Node) bool
- func CheckResourceStatus(obj client.Object, kubeClient client.Client, timeoutDuration time.Duration) error
- func CreateResource(ctx context.Context, resource client.Object, kubeClient client.Client) error
- func GenerateDeploymentManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, imageName string, ...) *appsv1.Deployment
- func GenerateDeploymentManifestWithPodTemplate(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) *appsv1.Deployment
- func GenerateHeadlessServiceManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace) *corev1.Service
- func GenerateServiceManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, ...) *corev1.Service
- func GenerateStatefulSetManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, imageName string, ...) *appsv1.StatefulSet
- func GenerateTuningJobManifest(ctx context.Context, wObj *kaitov1alpha1.Workspace, imageName string, ...) *batchv1.Job
- func GetNode(ctx context.Context, nodeName string, kubeClient client.Client) (*corev1.Node, error)
- func GetResource(ctx context.Context, name, namespace string, kubeClient client.Client, ...) error
- func ListNodes(ctx context.Context, kubeClient client.Client, ...) (*corev1.NodeList, error)
- func UpdateNodeWithLabel(ctx context.Context, nodeName, labelKey, labelValue string, ...) error
Constants ¶
View Source
const ( LabelKeyNvidia = "accelerator" LabelValueNvidia = "nvidia" CapacityNvidiaGPU = "nvidia.com/gpu" )
Variables ¶
This section is empty.
Functions ¶
func CheckResourceStatus ¶
func CreateResource ¶
func GenerateDeploymentManifest ¶
func GenerateDeploymentManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, imageName string, imagePullSecretRefs []corev1.LocalObjectReference, replicas int, commands []string, containerPorts []corev1.ContainerPort, livenessProbe, readinessProbe *corev1.Probe, resourceRequirements corev1.ResourceRequirements, tolerations []corev1.Toleration, volumes []corev1.Volume, volumeMount []corev1.VolumeMount) *appsv1.Deployment
func GenerateDeploymentManifestWithPodTemplate ¶
func GenerateDeploymentManifestWithPodTemplate(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, tolerations []corev1.Toleration) *appsv1.Deployment
func GenerateServiceManifest ¶
func GenerateServiceManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, serviceType corev1.ServiceType, isStatefulSet bool) *corev1.Service
func GenerateStatefulSetManifest ¶
func GenerateStatefulSetManifest(ctx context.Context, workspaceObj *kaitov1alpha1.Workspace, imageName string, imagePullSecretRefs []corev1.LocalObjectReference, replicas int, commands []string, containerPorts []corev1.ContainerPort, livenessProbe, readinessProbe *corev1.Probe, resourceRequirements corev1.ResourceRequirements, tolerations []corev1.Toleration, volumes []corev1.Volume, volumeMount []corev1.VolumeMount) *appsv1.StatefulSet
func GenerateTuningJobManifest ¶ added in v0.3.0
func GenerateTuningJobManifest(ctx context.Context, wObj *kaitov1alpha1.Workspace, imageName string, imagePullSecretRefs []corev1.LocalObjectReference, replicas int, commands []string, containerPorts []corev1.ContainerPort, livenessProbe, readinessProbe *corev1.Probe, resourceRequirements corev1.ResourceRequirements, tolerations []corev1.Toleration, initContainers []corev1.Container, sidecarContainers []corev1.Container, volumes []corev1.Volume, volumeMounts []corev1.VolumeMount, envVars []corev1.EnvVar) *batchv1.Job
func GetResource ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.