predictor

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetPodsAssignedToNodeFunc

type GetPodsAssignedToNodeFunc func(string) ([]*corev1.Pod, error)

GetPodsAssignedToNodeFunc is a function which accept a node name input and returns the pods that assigned to the node.

func BuildGetPodsAssignedToNodeFunc

func BuildGetPodsAssignedToNodeFunc(podInformer informerv1.PodInformer) (GetPodsAssignedToNodeFunc, error)

BuildGetPodsAssignedToNodeFunc establishes an indexer to map the pods and their assigned nodes. It returns a function to help us get all the pods that assigned to a node based on the indexer.

type Server added in v0.11.0

type Server struct {
	// contains filtered or unexported fields
}

func NewServer added in v0.11.0

func NewServer(
	clientConfig *restclient.Config,
	kubeClient kubernetes.Interface,
	informerFactory kubeinformers.SharedInformerFactory,
	addr string,
) (*Server, error)

func (*Server) MaxAcceptableReplicas added in v0.11.0

func (s *Server) MaxAcceptableReplicas(ctx context.Context, requirements appsapi.ReplicaRequirements) (schedulerapi.PredictorResults, error)

func (*Server) Run added in v0.11.0

func (s *Server) Run(ctx context.Context)

func (*Server) UnschedulableReplicas added in v0.11.0

func (s *Server) UnschedulableReplicas(ctx context.Context, gvk metav1.GroupVersionKind, namespacedName string,
	labelSelector map[string]string) (int32, error)

Jump to

Keyboard shortcuts

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