resultstore

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// PassedFilterMessage is used when a node pass the filter plugin.
	PassedFilterMessage = "passed"
	// SuccessMessage is used when no error is retured from the plugin.
	SuccessMessage = "success"
	// WaitMessage is used when wait status is retured from the plugin.
	WaitMessage = "wait"
	// PostFilterNominatedMessage is used when a postFilter plugin returns success.
	PostFilterNominatedMessage = "preemption victim"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store has results of scheduling. It manages all scheduling results and reflects all results on the pod annotation when the scheduling is finished.

func New

func New(scorePluginWeight map[string]int32) *Store

func (*Store) AddBindResult

func (s *Store) AddBindResult(namespace, podName, pluginName, status string)

func (*Store) AddCustomResult

func (s *Store) AddCustomResult(namespace, podName, annotationKey, result string)

AddCustomResult adds user defined data. The results added through this func is reflected on the Pod's annotation eventually like other scheduling results. This function is intended to be called from the plugin.PluginExtender; allow users to export some internal state on Pods for debugging purpose. For example, Calling AddCustomResult in NodeAffinity's PreFilterPluginExtender: AddCustomResult("namespace", "incomingPod", "node-affinity-filter-internal-state-anno-key", "internal-state") Then, "incomingPod" Pod will get {"node-affinity-filter-internal-state-anno-key": "internal-state"} annotation after scheduling.

func (*Store) AddFilterResult

func (s *Store) AddFilterResult(namespace, podName, nodeName, pluginName, reason string)

AddFilterResult adds filtering result to pod annotation.

func (*Store) AddNormalizedScoreResult

func (s *Store) AddNormalizedScoreResult(namespace, podName, nodeName, pluginName string, normalizedscore int64)

AddNormalizedScoreResult adds final score result to pod annotation.

func (*Store) AddPermitResult

func (s *Store) AddPermitResult(namespace, podName, pluginName, status string, timeout time.Duration)

func (*Store) AddPostFilterResult

func (s *Store) AddPostFilterResult(namespace, podName, nominatedNodeName, pluginName string, nodeNames []string)

AddPostFilterResult adds post filter result to the pod annotaiton.

  • nominatedNodeName represents the node name which nominated by the postFilter plugin. Otherwise, the string "" would be stored in this arg.

func (*Store) AddPreBindResult

func (s *Store) AddPreBindResult(namespace, podName, pluginName, status string)

func (*Store) AddPreFilterResult

func (s *Store) AddPreFilterResult(namespace, podName, pluginName, reason string, preFilterResult *framework.PreFilterResult)

func (*Store) AddPreScoreResult

func (s *Store) AddPreScoreResult(namespace, podName, pluginName, reason string)

func (*Store) AddReserveResult

func (s *Store) AddReserveResult(namespace, podName, pluginName, status string)

func (*Store) AddScoreResult

func (s *Store) AddScoreResult(namespace, podName, nodeName, pluginName string, score int64)

AddScoreResult adds scoring result to pod annotation.

func (*Store) AddSelectedNode

func (s *Store) AddSelectedNode(namespace, podName, nodeName string)

func (*Store) DeleteData

func (s *Store) DeleteData(pod v1.Pod)

DeleteData deletes the data corresponding to the specified Pod.

func (*Store) GetStoredResult

func (s *Store) GetStoredResult(pod *v1.Pod) map[string]string

GetStoredResult get all stored result of a given Pod.

Jump to

Keyboard shortcuts

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