Documentation
¶
Index ¶
- func GetActivePodsOnNode(ctx context.Context, kubeClient kubernetes.Interface, nodeName string) ([]corev1.Pod, error)
- func GetClientSet(mutations ...func(*rest.Config)) (*kubernetes.Clientset, error)
- func GetKubeConfig(mutations ...func(*rest.Config)) (*rest.Config, error)
- func InitKubeConfig(masterUrl, kubeconfig string) error
- func MutationContentType(acceptContentTypes, contentType string) func(*rest.Config)
- func MutationQPS(qps float32, burst int) func(*rest.Config)
- func MutationUser(userAgent string) func(*rest.Config)
- func PatchNodeMetadata(kubeClient kubernetes.Interface, nodeName string, patchMetadata PatchMetadata) error
- func PatchPodAllocationAllocating(kubeClient kubernetes.Interface, pod *corev1.Pod) error
- func PatchPodAllocationFailed(kubeClient kubernetes.Interface, pod *corev1.Pod) error
- func PatchPodAllocationSucceed(kubeClient kubernetes.Interface, pod *corev1.Pod) error
- func PatchPodMetadata(kubeClient kubernetes.Interface, pod *corev1.Pod, patchMetadata PatchMetadata) error
- func PatchPodVGPUAnnotation(kubeClient kubernetes.Interface, pod *corev1.Pod) error
- type PatchMetadata
- type PodInfo
- type PodResource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActivePodsOnNode ¶
func GetClientSet ¶
func GetClientSet(mutations ...func(*rest.Config)) (*kubernetes.Clientset, error)
func InitKubeConfig ¶
func MutationContentType ¶
func MutationUser ¶
func PatchNodeMetadata ¶
func PatchNodeMetadata(kubeClient kubernetes.Interface, nodeName string, patchMetadata PatchMetadata) error
func PatchPodAllocationAllocating ¶
func PatchPodAllocationAllocating(kubeClient kubernetes.Interface, pod *corev1.Pod) error
PatchPodAllocationAllocating patch pod metadata marking device allocation allocating.
func PatchPodAllocationFailed ¶
func PatchPodAllocationFailed(kubeClient kubernetes.Interface, pod *corev1.Pod) error
PatchPodAllocationFailed patch pod metadata marking device allocation failed.
func PatchPodAllocationSucceed ¶
func PatchPodAllocationSucceed(kubeClient kubernetes.Interface, pod *corev1.Pod) error
PatchPodAllocationSucceed patch pod metadata marking device allocation successful.
func PatchPodMetadata ¶
func PatchPodMetadata(kubeClient kubernetes.Interface, pod *corev1.Pod, patchMetadata PatchMetadata) error
func PatchPodVGPUAnnotation ¶
func PatchPodVGPUAnnotation(kubeClient kubernetes.Interface, pod *corev1.Pod) error
PatchPodVGPUAnnotation patch pod vGPU scheduling and allocation metadata.
Types ¶
type PatchMetadata ¶
type PodResource ¶
PodResource implements the get pod resource info
func NewPodResource ¶
func NewPodResource() *PodResource
NewPodResource returns an initialized PodResource
func (*PodResource) GetPodInfoByResourceDeviceIDs ¶
func (pr *PodResource) GetPodInfoByResourceDeviceIDs(resp *v1alpha1.ListPodResourcesResponse, resourceName string, deviceIDs []string) (*PodInfo, error)
func (*PodResource) ListPodResource ¶
func (pr *PodResource) ListPodResource() (*v1alpha1.ListPodResourcesResponse, error)
ListPodResource call pod resource List interface, get pod resource info
Click to show internal directories.
Click to hide internal directories.