kubernetes

package
v0.0.0-...-b75a7bb Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupNFDObjects

func CleanupNFDObjects(ctx context.Context, cli *nfdclient.Clientset, namespace string)

func CleanupNode

func CleanupNode(ctx context.Context, cs clientset.Interface)

CleanupNode deletes all NFD/GFD related metadata from the Node object, i.e. labels and annotations

func DeleteTaint

func DeleteTaint(taints []corev1.Taint, taintToDelete *corev1.Taint) ([]corev1.Taint, bool)

DeleteTaint removes all the taints that have the same key and effect to given taintToDelete.

func GetNode

func GetNode(nodes []corev1.Node, nodeName string) corev1.Node

func GetNonControlPlaneNodes

func GetNonControlPlaneNodes(ctx context.Context, cli clientset.Interface) ([]corev1.Node, error)

GetNonControlPlaneNodes gets the nodes that are not tainted for exclusive control-plane usage

func NewGPUJob

func NewGPUJob(name string, image string, gpuCount int) *batchv1.Job

NewGPUJob creates a new GPU job with the given name, image and gpuCount. It runs the nvidia cuda sample vectoradd.

func TaintExists

func TaintExists(taints []corev1.Taint, taintToFind *corev1.Taint) bool

TaintExists checks if the given taint exists in list of taints. Returns true if exists false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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