kubernetesk8s.io/kubernetes/pkg/kubelet/apis/podresources Index | Files

package podresources

import "k8s.io/kubernetes/pkg/kubelet/apis/podresources"

Index

Constants

const (
	// Socket is the name of the podresources server socket
	Socket = "kubelet"
)

Functions

func GetV1Client

func GetV1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1.PodResourcesListerClient, *grpc.ClientConn, error)

GetV1Client returns a client for the PodResourcesLister grpc service

func GetV1alpha1Client

func GetV1alpha1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1alpha1.PodResourcesListerClient, *grpc.ClientConn, error)

GetV1alpha1Client returns a client for the PodResourcesLister grpc service Note: This is deprecated

func NewV1PodResourcesServer

func NewV1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider, cpusProvider CPUsProvider) v1.PodResourcesListerServer

NewV1PodResourcesServer returns a PodResourcesListerServer which lists pods provided by the PodsProvider with device information provided by the DevicesProvider

func NewV1alpha1PodResourcesServer

func NewV1alpha1PodResourcesServer(podsProvider PodsProvider, devicesProvider DevicesProvider) v1alpha1.PodResourcesListerServer

NewV1alpha1PodResourcesServer returns a PodResourcesListerServer which lists pods provided by the PodsProvider with device information provided by the DevicesProvider

Types

type CPUsProvider

type CPUsProvider interface {
	GetCPUs(podUID, containerName string) []int64
}

CPUsProvider knows how to provide the cpus used by the given container

type DevicesProvider

type DevicesProvider interface {
	GetDevices(podUID, containerName string) []*podresourcesapi.ContainerDevices
	UpdateAllocatedDevices()
}

DevicesProvider knows how to provide the devices used by the given container

type PodsProvider

type PodsProvider interface {
	GetPods() []*v1.Pod
}

PodsProvider knows how to provide the pods admitted by the node

Source Files

client.go constants.go server_v1.go server_v1alpha1.go types.go

Version
v1.20.7
Published
May 12, 2021
Platform
windows/amd64
Imports
9 packages
Last checked
10 minutes ago

Tools for package owners.