Documentation ¶
Index ¶
- Variables
- func CleanupNFDObjects(ctx context.Context, cli *nfdclient.Clientset, namespace string)
- func CleanupNode(ctx context.Context, cs clientset.Interface)
- func DeleteTaint(taints []corev1.Taint, taintToDelete *corev1.Taint) ([]corev1.Taint, bool)
- func GetNode(nodes []corev1.Node, nodeName string) corev1.Node
- func GetNonControlPlaneNodes(ctx context.Context, cli clientset.Interface) ([]corev1.Node, error)
- func TaintExists(taints []corev1.Taint, taintToFind *corev1.Taint) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var GPUJob = &batchv1.Job{ ObjectMeta: metav1.ObjectMeta{ Name: "gpu-job", }, Spec: batchv1.JobSpec{ Template: v1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Name: "gpu-pod", }, Spec: v1.PodSpec{ RestartPolicy: "Never", Containers: []v1.Container{ { Name: "cuda-container", Image: "nvcr.io/nvidia/k8s/cuda-sample:nbody-cuda11.7.1-ubuntu18.04", Args: []string{"--benchmark", "--numbodies=10000"}, Resources: v1.ResourceRequirements{ Limits: v1.ResourceList{ "nvidia.com/gpu": resource.MustParse("1"), }, }, }, }, Tolerations: []v1.Toleration{ { Key: "nvidia.com/gpu", Operator: "Exists", Effect: "NoSchedule", }, }, }, }, }, }
Define the Job
Functions ¶
func CleanupNFDObjects ¶
func CleanupNode ¶
CleanupNode deletes all NFD/GFD related metadata from the Node object, i.e. labels and annotations
func DeleteTaint ¶
DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.
func GetNonControlPlaneNodes ¶
GetNonControlPlaneNodes gets the nodes that are not tainted for exclusive control-plane usage
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.